-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (49 loc) · 1.68 KB
/
trigger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Auto trigger on push
on: push
jobs:
changed-files:
name: Find changed recipes
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_files != '[]' && steps.changed-files.outputs.all_changed_files || '["module-template/b-7.1.x-ce-components-configuration.sh"]' }}
steps:
- name: Checkout recipes
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: '**/*.sh'
files_ignore: 'parts/**'
matrix: true
build:
name: Build the recipe
needs: [ changed-files ]
runs-on: ubuntu-latest
strategy:
matrix:
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
steps:
- name: Checkout SDK
uses: actions/checkout@v4
with:
repository: OXID-eSales/docker-eshop-sdk
- name: Checkout recipes
uses: actions/checkout@v4
with:
path: recipes/oxid-esales
- name: Run the recipe
run: './recipes/oxid-esales/${{ matrix.files }} -e CE'
- name: Test homepage
run: |
sudo echo "127.0.0.1 localhost.local" | sudo tee -a /etc/hosts
curl -s -N http://localhost.local | grep -q \
-e 'OXID Online Shop - Alles rund um das Thema Wassersport, Sportbekleidung und Mode' \
-e 'OXID Online Demoshop - Ihr zuverlässiger Partner für Fahrzeuge, Ersatzteile und Merchandise'
- name: Dump log
if: failure()
uses: actions/upload-artifact@v4
with:
name: oxideshop.log
path: source/**/log/oxideshop.log
if-no-files-found: ignore