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

Commit 756c0db

Browse files
committed
Fix latest tagging with docker buildx
1 parent 5ce440f commit 756c0db

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/beeper-ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,23 @@ jobs:
7878
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
7979
- run: |-
8080
if [ "${{ github.ref_name }}" = "beeper" ]; then
81-
tag=$(cat pyproject.toml | grep -E "^version =" | sed -E 's/^version = "(.+)"$/\1/');
81+
tag=$(cat pyproject.toml | grep -E "^version =" | sed -E 's/^version = "(.+)"$/\1/')
82+
extraTag="--tag ${{ secrets.CI_REGISTRY }}/synapse:latest"
8283
else
83-
tag="${{ github.head_ref || github.ref_name }}";
84+
tag="${{ github.head_ref || github.ref_name }}"
85+
extraTag=""
8486
fi
8587
8688
docker buildx build \
8789
--push \
8890
--platform linux/amd64,linux/arm64 \
8991
--tag ${{ secrets.CI_REGISTRY }}/synapse:$tag-${{ github.sha }} \
92+
$extraTag \
9093
-f docker/Dockerfile \
9194
.
9295
9396
echo "Pushed image: synapse:$tag-${{ github.sha }}"
94-
9597
if [ "${{ github.ref_name }}" = "beeper" ]; then
96-
docker tag \
97-
${{ secrets.CI_REGISTRY }}/synapse:$tag-${{ github.sha }} \
98-
${{ secrets.CI_REGISTRY }}/synapse:latest
99-
docker push ${{ secrets.CI_REGISTRY }}/synapse:latest
10098
echo "Pushed image: synapse:latest"
10199
fi
102100

0 commit comments

Comments
 (0)