Skip to content

Commit a5d574b

Browse files
committed
Switch PR workflow to pull_request
1 parent 25daa6c commit a5d574b

File tree

1 file changed

+29
-34
lines changed

1 file changed

+29
-34
lines changed

.github/workflows/pull_request.yml

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Pull Request
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
branches:
66
- master
77

@@ -45,24 +45,19 @@ jobs:
4545
- name: Set up Docker Buildx
4646
uses: docker/setup-buildx-action@v3
4747

48-
- name: Login to Registry
49-
uses: docker/login-action@v3
50-
with:
51-
username: ${{ secrets.STAKATER_DOCKERHUB_USERNAME }}
52-
password: ${{ secrets.STAKATER_DOCKERHUB_PASSWORD }}
53-
5448
- name: Generate image repository path
5549
run: |
5650
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
5751
58-
- name: Build and push
52+
# To identify any broken changes in dockerfiles or dependencies
53+
54+
- name: Build image
5955
uses: docker/build-push-action@v6
6056
with:
6157
context: .
6258
file: ${{ env.DOCKER_FILE_PATH }}
6359
pull: true
64-
push: true
65-
build-args: GIT_ACCESS_TOKEN=${{ secrets.STAKATER_GITHUB_TOKEN }}
60+
push: false
6661
cache-to: type=inline
6762
tags: |
6863
${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
@@ -71,29 +66,29 @@ jobs:
7166
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
7267
org.opencontainers.image.revision=${{ github.sha }}
7368
74-
- name: Comment on PR
75-
uses: mshick/add-pr-comment@v2
76-
env:
77-
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
78-
with:
79-
message: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
80-
allow-repeats: false
69+
# - name: Comment on PR
70+
# uses: mshick/add-pr-comment@v2
71+
# env:
72+
# GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
73+
# with:
74+
# message: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
75+
# allow-repeats: false
8176

82-
- name: Notify Failure
83-
if: failure()
84-
uses: mshick/add-pr-comment@v2
85-
env:
86-
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
87-
with:
88-
message: '@${{ 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!'
89-
allow-repeats: false
77+
# - name: Notify Failure
78+
# if: failure()
79+
# uses: mshick/add-pr-comment@v2
80+
# env:
81+
# GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
82+
# with:
83+
# message: '@${{ 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!'
84+
# allow-repeats: false
9085

91-
- name: Notify Slack
92-
uses: 8398a7/action-slack@v3
93-
if: always() # Pick up events even if the job fails or is canceled.
94-
with:
95-
status: ${{ job.status }}
96-
fields: repo,author,action,eventName,ref,workflow
97-
env:
98-
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
99-
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
86+
# - name: Notify Slack
87+
# uses: 8398a7/action-slack@v3
88+
# if: always() # Pick up events even if the job fails or is canceled.
89+
# with:
90+
# status: ${{ job.status }}
91+
# fields: repo,author,action,eventName,ref,workflow
92+
# env:
93+
# GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
94+
# SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)