-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (55 loc) · 2.16 KB
/
shopware.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
61
62
63
64
65
66
67
68
name: Build Shopware
on:
workflow_dispatch:
push:
paths:
- images/6/**
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: ubuntu-latest
arch: amd64
- runner: buildjet-2vcpu-ubuntu-2204-arm
arch: arm64
steps:
- name: Clone
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Get latest version
run: |
VERSION=$(curl -s https://api.github.com/repos/shopware/shopware/releases/latest | jq -r .tag_name | sed 's/^.//')
TAG=$(echo $VERSION | tr . ' ' | awk '{print $1 "." $2 "." $3}')
echo "version=$VERSION" >> $GITHUB_ENV
echo "tag=$TAG" >> $GITHUB_ENV
- uses: docker/build-push-action@v4
with:
tags: ghcr.io/shopwarelabs/testenv:${{ env.tag }}-${{ matrix.arch }}
build-args: |
SHOPWARE_VERSION=${{ env.version }}
context: images/6
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
provenance: false
merge-manifest:
name: Merge Manifest
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Get latest version
run: |
VERSION=$(curl -s https://api.github.com/repos/shopware/shopware/releases/latest | jq -r .tag_name | sed 's/^.//')
TAG=$(echo $VERSION | tr . ' ' | awk '{print $1 "." $2 "." $3}')
echo "version=$VERSION" >> $GITHUB_ENV
echo "tag=$TAG" >> $GITHUB_ENV
- run: docker manifest create ghcr.io/shopwarelabs/testenv:${{ env.tag }} --amend ghcr.io/shopwarelabs/testenv:${{ env.tag }}-amd64 --amend ghcr.io/shopwarelabs/testenv:${{ env.tag }}-arm64
- run: docker manifest push ghcr.io/shopwarelabs/testenv:${{ env.tag }}