Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit c9d3e53

Browse files
David Robertsonmichaelkaye
authored andcommitted
Fix GHA job for pushing the complement-synapse image (#14573)
Co-authored-by: Michael Kaye <[email protected]>
1 parent cf99691 commit c9d3e53

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/push_complement_image.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
File renamed without changes.

changelog.d/14573.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Push complement-synapse docker images to ghcr.io repository.

0 commit comments

Comments
 (0)