File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change 1
1
name : Image push per Github Tag
2
2
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.
8
4
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
12
11
env :
13
12
QUAY_IMAGE_REPO : ${{ secrets.QUAY_IMAGE_REPO }}
14
13
jobs :
@@ -32,19 +31,15 @@ jobs:
32
31
QUAY_ROBOT_TOKEN : ${{ secrets.QUAY_ROBOT_TOKEN }}
33
32
run : |
34
33
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}
38
34
- name : Get latest tag hash
39
35
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}
41
37
- name : Create new tag
42
38
shell : bash
43
39
env :
44
- TAG : ${{ steps.tag.outputs.tag }}
45
40
HASH : ${{ steps.hash.outputs.hash }}
46
41
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 }}
48
43
- name : Create latest tag
49
44
shell : bash
50
45
env :
You can’t perform that action at this time.
0 commit comments