File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11image = " proton-bridge"
2- version = " 3.21.2 "
2+ version = " 3.22.0 "
33platforms = [" linux/amd64" , " linux/arm64" ]
44build_args = { ENV_PROTONMAIL_BRIDGE_VERSION = " v3.22.0" , ENV_PROTONMAIL_BRIDGE_COMMIT = " 87bba395d0f93301ac318d9b5cffde3312bbe13e" }
You can’t perform that action at this time.
0 commit comments