1
1
name : Pull Request
2
2
3
3
on :
4
- pull_request_target :
4
+ pull_request :
5
5
branches :
6
6
- master
7
7
paths :
@@ -107,70 +107,19 @@ jobs:
107
107
- name : Set up Docker Buildx
108
108
uses : docker/setup-buildx-action@v3
109
109
110
- - name : Login to Docker Registry
111
- uses : docker/login-action@v3
112
- with :
113
- username : ${{ secrets.STAKATER_DOCKERHUB_USERNAME }}
114
- password : ${{ secrets.STAKATER_DOCKERHUB_PASSWORD }}
115
-
116
- - name : Generate image repository path for Docker registry
117
- run : |
118
- echo DOCKER_IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
119
-
120
- - name : Build and Push Docker Image to Docker registry
121
- uses : docker/build-push-action@v5
122
- with :
123
- context : .
124
- file : ${{ env.DOCKER_FILE_PATH }}
125
- pull : true
126
- push : true
127
- build-args : BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
128
- cache-to : type=inline
129
- platforms : linux/amd64,linux/arm,linux/arm64
130
- tags : |
131
- ${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
132
- labels : |
133
- org.opencontainers.image.source=${{ github.event.repository.clone_url }}
134
- org.opencontainers.image.created=${{ steps.prep.outputs.created }}
135
- org.opencontainers.image.revision=${{ github.sha }}
136
-
137
- - name : Build and Push Docker UBI Image to Docker registry
138
- uses : docker/build-push-action@v5
139
- with :
140
- context : .
141
- file : ${{ env.DOCKER_UBI_FILE_PATH }}
142
- pull : true
143
- push : true
144
- build-args : |
145
- BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
146
- BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
147
- cache-to : type=inline
148
- platforms : linux/amd64,linux/arm64
149
- tags : |
150
- ${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }}
151
- labels : |
152
- org.opencontainers.image.source=${{ github.event.repository.clone_url }}
153
- org.opencontainers.image.created=${{ steps.prep.outputs.created }}
154
- org.opencontainers.image.revision=${{ github.sha }}
155
-
156
- - name : Login to ghcr registry
157
- uses : docker/login-action@v3
158
- with :
159
- registry : ${{env.REGISTRY}}
160
- username : ${{github.actor}}
161
- password : ${{secrets.GITHUB_TOKEN}}
162
-
163
110
- name : Generate image repository path for ghcr registry
164
111
run : |
165
112
echo GHCR_IMAGE_REPOSITORY=${{env.REGISTRY}}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
166
113
167
- - name : Build and Push Docker Image to ghcr registry
114
+ # To identify any broken changes in dockerfiles or dependencies
115
+
116
+ - name : Build Docker Image
168
117
uses : docker/build-push-action@v5
169
118
with :
170
119
context : .
171
120
file : ${{ env.DOCKER_FILE_PATH }}
172
121
pull : true
173
- push : true
122
+ push : false
174
123
build-args : BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
175
124
cache-to : type=inline
176
125
platforms : linux/amd64,linux/arm,linux/arm64
@@ -181,13 +130,13 @@ jobs:
181
130
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
182
131
org.opencontainers.image.revision=${{ github.sha }}
183
132
184
- - name : Build and Push Docker UBI Image to ghcr registry
133
+ - name : Build Docker UBI Image
185
134
uses : docker/build-push-action@v5
186
135
with :
187
136
context : .
188
137
file : ${{ env.DOCKER_UBI_FILE_PATH }}
189
138
pull : true
190
- push : true
139
+ push : false
191
140
build-args : |
192
141
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
193
142
BUILDER_IMAGE=${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
@@ -200,22 +149,22 @@ jobs:
200
149
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
201
150
org.opencontainers.image.revision=${{ github.sha }}
202
151
203
- - name : Comment on PR
204
- uses : mshick/add-pr-comment@v2
205
- if : always()
206
- env :
207
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
208
- with :
209
- message-success : ' @${{ github.actor }} Images are available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`\n`docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }}`'
210
- message-failure : ' @${{ github.actor }} Yikes! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!'
211
- allow-repeats : true
212
-
213
- - name : Notify Slack
214
- uses : 8398a7/action-slack@v3
215
- if : always() # Pick up events even if the job fails or is canceled.
216
- with :
217
- status : ${{ job.status }}
218
- fields : repo,author,action,eventName,ref,workflow
219
- env :
220
- GITHUB_TOKEN : ${{ secrets.STAKATER_GITHUB_TOKEN }}
221
- SLACK_WEBHOOK_URL : ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
152
+ # - name: Comment on PR
153
+ # uses: mshick/add-pr-comment@v2
154
+ # if: always()
155
+ # env:
156
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157
+ # with:
158
+ # message-success: '@${{ github.actor }} Images are available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`\n`docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }}`'
159
+ # message-failure: '@${{ github.actor }} Yikes! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!'
160
+ # allow-repeats: true
161
+
162
+ # - name: Notify Slack
163
+ # uses: 8398a7/action-slack@v3
164
+ # if: always() # Pick up events even if the job fails or is canceled.
165
+ # with:
166
+ # status: ${{ job.status }}
167
+ # fields: repo,author,action,eventName,ref,workflow
168
+ # env:
169
+ # GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
170
+ # SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
0 commit comments