Skip to content

Commit c9f5c1b

Browse files
committed
Turn of auto image tagging for dspo.
Signed-off-by: Humair Khan <[email protected]>
1 parent 7527318 commit c9f5c1b

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

.github/workflows/tag-release-quay.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: Image push per Github Tag
22

3-
# This GitHub action activates whenever a new tag is created on the repo under "opendatahub-io"
4-
# and creates a copy of the image of the associated commit hash with the
5-
# appropriate tag name.
6-
7-
run-name: Creating new tag in quay based on pushed tag in Github.
3+
run-name: Creating new tag in quay based on latest pushed tag in Github.
84
on:
9-
push:
10-
tags:
11-
- '*'
5+
workflow_dispatch:
6+
inputs:
7+
target_tag:
8+
default: 'vx.y.z'
9+
description: 'DSPO Tag'
10+
required: true
1211
env:
1312
QUAY_IMAGE_REPO: ${{ secrets.QUAY_IMAGE_REPO }}
1413
jobs:
@@ -32,19 +31,15 @@ jobs:
3231
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
3332
run: |
3433
skopeo login quay.io -u ${QUAY_ROBOT_USERNAME} -p ${QUAY_ROBOT_TOKEN}
35-
- name: Get latest tag name
36-
id: tag
37-
run: echo "tag=$(git describe --tags --abbrev=0)" >> ${GITHUB_OUTPUT}
3834
- name: Get latest tag hash
3935
id: hash
40-
run: echo "hash=$(git rev-parse --short ${{ steps.tag.outputs.tag }} )" >> ${GITHUB_OUTPUT}
36+
run: echo "hash=$(git rev-parse --short ${{ inputs.target_tag }} )" >> ${GITHUB_OUTPUT}
4137
- name: Create new tag
4238
shell: bash
4339
env:
44-
TAG: ${{ steps.tag.outputs.tag }}
4540
HASH: ${{ steps.hash.outputs.hash }}
4641
run: |
47-
skopeo copy docker://${QUAY_IMAGE_REPO}:main-${{ env.HASH }} docker://${QUAY_IMAGE_REPO}:${{ env.TAG }}
42+
skopeo copy docker://${QUAY_IMAGE_REPO}:main-${{ env.HASH }} docker://${QUAY_IMAGE_REPO}:${{ inputs.target_tag }}
4843
- name: Create latest tag
4944
shell: bash
5045
env:

0 commit comments

Comments
 (0)