Skip to content

Commit 7403e3f

Browse files
Maxusmustiopenshift-merge-robot
authored andcommitted
Changed to build/push on release tags
1 parent c287dea commit 7403e3f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/image.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ name: Image
44

55
on:
66
push:
7-
branches: ["main"]
8-
paths:
9-
- "VERSION"
7+
tags:
8+
- "*"
109

1110
jobs:
1211
push:
@@ -15,8 +14,9 @@ jobs:
1514
- uses: actions/checkout@v3
1615

1716
- name: Grab New Version Tag
17+
id: tag_name
1818
run: |
19-
echo "tag=$(cat VERSION)" >> $GITHUB_ENV
19+
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
2020
2121
- name: Login to Quay.io
2222
uses: redhat-actions/podman-login@v1
@@ -34,14 +34,18 @@ jobs:
3434

3535
- name: Image Build
3636
run: |
37-
make image-build -e IMG=quay.io/project-codeflare/codeflare-operator:${{ env.tag }}
38-
podman tag quay.io/project-codeflare/codeflare-operator:${{ env.tag }} quay.io/project-codeflare/codeflare-operator:latest
39-
make bundle-build -e BUNDLE_IMG=quay.io/project-codeflare/codeflare-operator-bundle:${{ env.tag }}
40-
podman tag quay.io/project-codeflare/codeflare-operator-bundle:${{ env.tag }} quay.io/project-codeflare/codeflare-operator-bundle:latest
37+
make image-build -e IMG=quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG}
38+
podman tag quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG} quay.io/project-codeflare/codeflare-operator:latest
39+
make bundle-build -e BUNDLE_IMG=quay.io/project-codeflare/codeflare-operator-bundle:${SOURCE_TAG}
40+
podman tag quay.io/project-codeflare/codeflare-operator-bundle:${SOURCE_TAG} quay.io/project-codeflare/codeflare-operator-bundle:latest
41+
env:
42+
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }}
4143

4244
- name: Image Push
4345
run: |
44-
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:${{ env.tag }}
46+
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG}
4547
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:latest
46-
make bundle-push -e BUNDLE_IMG=quay.io/project-codeflare/codeflare-operator-bundle:${{ env.tag }}
48+
make bundle-push -e BUNDLE_IMG=quay.io/project-codeflare/codeflare-operator-bundle:${SOURCE_TAG}
4749
make bundle-push -e BUNDLE_IMG=quay.io/project-codeflare/codeflare-operator-bundle:latest
50+
env:
51+
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }}

0 commit comments

Comments
 (0)