Skip to content

Commit

Permalink
Turn of auto image tagging for dspo.
Browse files Browse the repository at this point in the history
Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
  • Loading branch information
HumairAK committed Jul 27, 2023
1 parent 7527318 commit c9f5c1b
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/tag-release-quay.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit c9f5c1b

Please sign in to comment.