@@ -34,17 +34,17 @@ jobs:
34
34
steps :
35
35
- name : Checkout specific branch (debug build)
36
36
uses : actions/checkout@v3
37
- if : ' github.event.type == " workflow_dispatch" '
37
+ if : github.event_name == ' workflow_dispatch'
38
38
with :
39
39
ref : ${{ inputs.branch }}
40
40
- name : Checkout clean copy of develop (scheduled build)
41
41
uses : actions/checkout@v3
42
- if : ' github.event.type == " schedule" '
42
+ if : github.event_name == ' schedule'
43
43
with :
44
44
ref : develop
45
45
- name : Checkout clean copy of master (on-push)
46
46
uses : actions/checkout@v3
47
- if : ' github.event.type == " push" '
47
+ if : github.event_name == ' push'
48
48
with :
49
49
ref : master
50
50
- name : Login to registry
@@ -55,14 +55,20 @@ jobs:
55
55
password : ${{ secrets.GITHUB_TOKEN }}
56
56
- name : Work out labels for complement image
57
57
id : meta
58
- uses : docker/metadata-action@v1
58
+ uses : docker/metadata-action@v4
59
59
with :
60
60
images : ghcr.io/${{ github.repository }}/complement-synapse
61
- - name : Build complement image
61
+ tags : |
62
+ type=schedule,pattern=nightly,enable=${{ github.event_name == 'schedule'}}
63
+ type=raw,value=develop,enable=${{ github.event_name == 'schedule' || inputs.branch == 'develop' }}
64
+ type=raw,value=latest,enable=${{ github.event_name == 'push' || inputs.branch == 'master' }}
65
+ type=sha,format=long
66
+ - name : Run scripts-dev/complement.sh to generate complement-synapse:latest image.
62
67
run : scripts-dev/complement.sh --build-only
63
68
- name : Tag and push generated image
64
69
run : |
65
- for TAG in ${{ steps.meta.outputs.tags }}; do
66
- docker tag complement-synapse:latest $TAG
70
+ for TAG in ${{ join(fromJson(steps.meta.outputs.json).tags, ' ') }}; do
71
+ echo "tag and push $TAG"
72
+ docker tag complement-synapse $TAG
67
73
docker push $TAG
68
74
done
0 commit comments