@@ -34,17 +34,17 @@ jobs:
3434 steps :
3535 - name : Checkout specific branch (debug build)
3636 uses : actions/checkout@v3
37- if : ' github.event.type == " workflow_dispatch" '
37+ if : github.event_name == ' workflow_dispatch'
3838 with :
3939 ref : ${{ inputs.branch }}
4040 - name : Checkout clean copy of develop (scheduled build)
4141 uses : actions/checkout@v3
42- if : ' github.event.type == " schedule" '
42+ if : github.event_name == ' schedule'
4343 with :
4444 ref : develop
4545 - name : Checkout clean copy of master (on-push)
4646 uses : actions/checkout@v3
47- if : ' github.event.type == " push" '
47+ if : github.event_name == ' push'
4848 with :
4949 ref : master
5050 - name : Login to registry
@@ -55,14 +55,20 @@ jobs:
5555 password : ${{ secrets.GITHUB_TOKEN }}
5656 - name : Work out labels for complement image
5757 id : meta
58- uses : docker/metadata-action@v1
58+ uses : docker/metadata-action@v4
5959 with :
6060 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.
6267 run : scripts-dev/complement.sh --build-only
6368 - name : Tag and push generated image
6469 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
6773 docker push $TAG
6874 done
0 commit comments