-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 2.37 KB
/
setup-workflow.yml
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
58
59
60
name: Reusable workflow for Shopware setup
on:
workflow_call:
inputs:
mysql-version:
required: true
type: string
shopware-version:
required: true
type: string
php-version:
required: true
type: string
consent-manager:
required: false
type: string
default: "none"
jobs:
setup-shopware:
name: Setup Shopware ${{ inputs.shopware-version }}
runs-on: ubuntu-latest
env:
MYSQL_VERSION: ${{ inputs.mysql-version }}
SHOPWARE_VERSION: ${{ inputs.shopware-version }}
PHP_VERSION: ${{ inputs.php-version }}
CONSENT_MANAGER: ${{ inputs.consent-manager }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Install dependencies
run: npm install
- name: Create base image
run: make running:shopware_${{ env.SHOPWARE_VERSION }}_${{ env.MYSQL_VERSION }}_${{ env.PHP_VERSION }}
- name: Push base image
if: ${{ github.ref == 'refs/heads/main' }}
run: docker push ghcr.io/shopware5/docker-images-testing/running:shopware_${{ env.SHOPWARE_VERSION }}_${{ env.MYSQL_VERSION }}_${{ env.PHP_VERSION }}
- name: Create allInOne Image
run: make install:shopware_${{ env.SHOPWARE_VERSION }}_${{ env.MYSQL_VERSION }}_${{ env.PHP_VERSION }}_${{ env.CONSENT_MANAGER }}
- name: Test allInOne Image
run: make test:shopware_${{ env.SHOPWARE_VERSION }}_${{ env.MYSQL_VERSION }}_${{ env.PHP_VERSION }}_${{ env.CONSENT_MANAGER }}
- name: Push allInOne Image
if: ${{ github.ref == 'refs/heads/main' }}
run: docker push ghcr.io/shopware5/docker-images-testing/install:shopware_${{ env.SHOPWARE_VERSION }}_${{ env.MYSQL_VERSION }}_${{ env.PHP_VERSION }}_${{ env.CONSENT_MANAGER }}