Skip to content

Commit

Permalink
Merge pull request #231 from HumairAK/disable-auto-tag-release
Browse files Browse the repository at this point in the history
Turn of auto image tagging for dspo.
  • Loading branch information
HumairAK authored Jul 27, 2023
2 parents 2932ecb + c9f5c1b commit 6d1efe1
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 6d1efe1

Please sign in to comment.