Skip to content

Commit 6cc3adf

Browse files
committed
Push images in different job
1 parent 56a6422 commit 6cc3adf

File tree

1 file changed

+45
-30
lines changed

1 file changed

+45
-30
lines changed

.github/workflows/iso-ci.yaml

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -79,40 +79,55 @@ jobs:
7979
build-args: |
8080
VCS_REF=${{ env.BUILD_VERSION || 'dev' }}-${{ steps.vars.outputs.sha_short }}
8181
VCS_URL=${{ env.VCS_URL }}
82-
# Only push if we are publishing a release
83-
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
8482
# Use a 'dev' tag, that won't be pushed, for non-release builds
8583
tags: quay.io/uriziv1/ibm-block-csi-driver-node:${{ env.BUILD_VERSION || 'dev' }}
84+
push: false
8685

87-
# Build and (optionally) push the csi controller image
88-
- name: build csi controller image
89-
uses: docker/build-push-action@v6
90-
with:
91-
context: .
92-
file: ./Dockerfile-csi-controller
93-
platforms: linux/amd64,linux/ppc64le,linux/s390x
94-
build-args: |
95-
VCS_REF=${{ env.BUILD_VERSION || 'dev' }}-${{ steps.vars.outputs.sha_short }}
96-
VCS_URL=${{ env.VCS_URL }}
97-
# Only push if we are publishing a release
98-
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
99-
# Use a 'dev' tag, that won't be pushed, for non-release builds
100-
tags: quay.io/uriziv1/ibm-block-csi-driver-controller:${{ env.BUILD_VERSION || 'dev' }}
86+
## Build and (optionally) push the csi controller image
87+
#- name: build csi controller image
88+
# uses: docker/build-push-action@v6
89+
# with:
90+
# context: .
91+
# file: ./Dockerfile-csi-controller
92+
# platforms: linux/amd64,linux/ppc64le,linux/s390x
93+
# build-args: |
94+
# VCS_REF=${{ env.BUILD_VERSION || 'dev' }}-${{ steps.vars.outputs.sha_short }}
95+
# VCS_URL=${{ env.VCS_URL }}
96+
# # Use a 'dev' tag, that won't be pushed, for non-release builds
97+
# tags: quay.io/uriziv1/ibm-block-csi-driver-controller:${{ env.BUILD_VERSION || 'dev' }}
98+
# push: false
99+
100+
## Build and (optionally) push the csi host-definer image
101+
#- name: build csi host-definer image
102+
# uses: docker/build-push-action@v6
103+
# with:
104+
# context: .
105+
# file: ./Dockerfile-csi-host-definer
106+
# platforms: linux/amd64,linux/ppc64le,linux/s390x
107+
# build-args: |
108+
# VCS_REF=${{ env.BUILD_VERSION || 'dev' }}-${{ steps.vars.outputs.sha_short }}
109+
# VCS_URL=${{ env.VCS_URL }}
110+
# # Use a 'dev' tag, that won't be pushed, for non-release builds
111+
# tags: quay.io/uriziv1/ibm-block-csi-host-definer:${{ env.BUILD_VERSION || 'dev' }}
112+
# push: false
113+
114+
push-images:
115+
needs: build-and-push
116+
runs-on: ubuntu-latest
117+
if: github.event_name == 'release' && github.event.action == 'published'
118+
steps:
119+
- name: Checkout code # Required for context.
120+
uses: actions/checkout@v3
121+
- name: push images
122+
uses: docker/build-push-action@v6
123+
with:
124+
context: .
125+
push: true
126+
images: |
127+
quay.io/uriziv1/ibm-block-csi-driver-node:${{ env.BUILD_VERSION || 'dev' }}
128+
quay.io/uriziv1/ibm-block-csi-driver-controller:${{ env.BUILD_VERSION || 'dev' }}
129+
quay.io/uriziv1/ibm-block-csi-driver-host-definer:${{ env.BUILD_VERSION || 'dev' }}
101130
102-
# Build and (optionally) push the csi host-definer image
103-
- name: build csi host-definer image
104-
uses: docker/build-push-action@v6
105-
with:
106-
context: .
107-
file: ./Dockerfile-csi-host-definer
108-
platforms: linux/amd64,linux/ppc64le,linux/s390x
109-
build-args: |
110-
VCS_REF=${{ env.BUILD_VERSION || 'dev' }}-${{ steps.vars.outputs.sha_short }}
111-
VCS_URL=${{ env.VCS_URL }}
112-
# Only push if we are publishing a release
113-
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
114-
# Use a 'dev' tag, that won't be pushed, for non-release builds
115-
tags: quay.io/uriziv1/ibm-block-csi-host-definer:${{ env.BUILD_VERSION || 'dev' }}
116131
117132
#- name: generate bundle manifests and metadata
118133
# run: |

0 commit comments

Comments
 (0)