From c9f5c1bd3e1d8e7f75b168013efafd0a217d163c Mon Sep 17 00:00:00 2001 From: Humair Khan Date: Thu, 27 Jul 2023 14:40:01 -0400 Subject: [PATCH] Turn of auto image tagging for dspo. Signed-off-by: Humair Khan --- .github/workflows/tag-release-quay.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tag-release-quay.yml b/.github/workflows/tag-release-quay.yml index 6e11de620..385de10ad 100644 --- a/.github/workflows/tag-release-quay.yml +++ b/.github/workflows/tag-release-quay.yml @@ -1,14 +1,13 @@ name: Image push per Github Tag -# This GitHub action activates whenever a new tag is created on the repo under "opendatahub-io" -# and creates a copy of the image of the associated commit hash with the -# appropriate tag name. - -run-name: Creating new tag in quay based on pushed tag in Github. +run-name: Creating new tag in quay based on latest pushed tag in Github. on: - push: - tags: - - '*' + workflow_dispatch: + inputs: + target_tag: + default: 'vx.y.z' + description: 'DSPO Tag' + required: true env: QUAY_IMAGE_REPO: ${{ secrets.QUAY_IMAGE_REPO }} jobs: @@ -32,19 +31,15 @@ jobs: QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} run: | skopeo login quay.io -u ${QUAY_ROBOT_USERNAME} -p ${QUAY_ROBOT_TOKEN} - - name: Get latest tag name - id: tag - run: echo "tag=$(git describe --tags --abbrev=0)" >> ${GITHUB_OUTPUT} - name: Get latest tag hash id: hash - run: echo "hash=$(git rev-parse --short ${{ steps.tag.outputs.tag }} )" >> ${GITHUB_OUTPUT} + run: echo "hash=$(git rev-parse --short ${{ inputs.target_tag }} )" >> ${GITHUB_OUTPUT} - name: Create new tag shell: bash env: - TAG: ${{ steps.tag.outputs.tag }} HASH: ${{ steps.hash.outputs.hash }} run: | - skopeo copy docker://${QUAY_IMAGE_REPO}:main-${{ env.HASH }} docker://${QUAY_IMAGE_REPO}:${{ env.TAG }} + skopeo copy docker://${QUAY_IMAGE_REPO}:main-${{ env.HASH }} docker://${QUAY_IMAGE_REPO}:${{ inputs.target_tag }} - name: Create latest tag shell: bash env: