Skip to content

Commit 8195944

Browse files
committed
Fix proton-bridge publish tagging semantics
1 parent 115db7f commit 8195944

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,29 @@ jobs:
7575
username: ${{ github.actor }}
7676
password: ${{ secrets.GITHUB_TOKEN }}
7777

78+
- id: latest-guard
79+
shell: bash
80+
run: |
81+
set -euo pipefail
82+
git fetch --no-tags --depth=1 origin main
83+
main_head="$(git rev-parse origin/main)"
84+
if [[ "${GITHUB_SHA}" == "${main_head}" ]]; then
85+
echo "publish_latest=true" >> "$GITHUB_OUTPUT"
86+
else
87+
echo "publish_latest=false" >> "$GITHUB_OUTPUT"
88+
fi
89+
7890
- id: meta
7991
shell: bash
8092
run: |
8193
set -euo pipefail
8294
base="ghcr.io/${{ github.repository }}/${{ matrix.image_name }}"
8395
short="${GITHUB_SHA::7}"
8496
85-
tags=("$base:latest" "$base:sha-$short")
97+
tags=("$base:sha-$short")
98+
if [[ "${{ steps.latest-guard.outputs.publish_latest }}" == "true" ]]; then
99+
tags=("$base:latest" "${tags[@]}")
100+
fi
86101
if [[ -n "${{ matrix.version }}" ]]; then
87102
tags+=("$base:${{ matrix.version }}")
88103
fi

images/proton-bridge/image.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
image = "proton-bridge"
2-
version = "3.21.2"
2+
version = "3.22.0"
33
platforms = ["linux/amd64", "linux/arm64"]
44
build_args = { ENV_PROTONMAIL_BRIDGE_VERSION = "v3.22.0", ENV_PROTONMAIL_BRIDGE_COMMIT = "87bba395d0f93301ac318d9b5cffde3312bbe13e" }

0 commit comments

Comments
 (0)