Skip to content

Commit b344ef2

Browse files
authored
chore(ci): add timeout to image.yaml workflow; use latest tag name instead of 99.9.9 for snapshot images (#1334)
Signed-off-by: Cheng Fang <[email protected]>
1 parent fc7b082 commit b344ef2

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/workflows/build-push-images.yaml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ jobs:
2323
- name: Checkout code
2424
uses: actions/checkout@v5
2525

26-
- name: Get version
27-
id: version
26+
- name: Get version-tag
27+
id: version-tag
2828
run: |
29-
echo version=$(cat VERSION) >> $GITHUB_OUTPUT
29+
VERSION=$(cat VERSION)
30+
if [ "$VERSION" = "99.9.9" ]; then
31+
VERSION_TAG="latest"
32+
else
33+
VERSION_TAG="v${VERSION}"
34+
fi
35+
echo version-tag=${VERSION_TAG} >> $GITHUB_OUTPUT
3036
3137
- name: Detect platform
3238
id: platform
@@ -48,7 +54,7 @@ jobs:
4854
run: |
4955
set -euo pipefail
5056
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin quay.io
51-
IMAGE_TAG="v${{ steps.version.outputs.version }}-${{ steps.platform.outputs.arch-tag }}" make docker-build docker-push
57+
IMAGE_TAG="${{ steps.version-tag.outputs.version-tag }}-${{ steps.platform.outputs.arch-tag }}" make docker-build docker-push
5258
env:
5359
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
5460
DOCKER_PASSWORD: ${{ secrets.QUAY_TOKEN }}
@@ -63,10 +69,16 @@ jobs:
6369
- name: Checkout code
6470
uses: actions/checkout@v5
6571

66-
- name: Get version
67-
id: version
72+
- name: Get version-tag
73+
id: version-tag
6874
run: |
69-
echo version=$(cat VERSION) >> $GITHUB_OUTPUT
75+
VERSION=$(cat VERSION)
76+
if [ "$VERSION" = "99.9.9" ]; then
77+
VERSION_TAG="latest"
78+
else
79+
VERSION_TAG="v${VERSION}"
80+
fi
81+
echo version-tag=${VERSION_TAG} >> $GITHUB_OUTPUT
7082
7183
- name: Login to registry
7284
run: |
@@ -80,7 +92,7 @@ jobs:
8092
run: |
8193
set -ex
8294
IMAGE_NAME="quay.io/argoprojlabs/argocd-image-updater"
83-
VERSION_TAG="v${{ steps.version.outputs.version }}"
95+
VERSION_TAG="${{ steps.version-tag.outputs.version-tag }}"
8496
8597
# Build list of platform-specific tags that exist
8698
MANIFEST_TAGS=""

.github/workflows/image.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
build_image:
1414
if: github.repository == 'argoproj-labs/argocd-image-updater'
1515
runs-on: ubuntu-latest
16+
timeout-minutes: 45
1617
steps:
1718
- name: Checkout code
1819
uses: actions/checkout@v5

0 commit comments

Comments
 (0)