Skip to content

Commit

Permalink
Change workflow trigger for pull_request (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
MuneebAijaz authored Aug 21, 2024
1 parent 474d9b7 commit 50c1ad5
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Pull Request

on:
pull_request_target:
pull_request:
branches:
- master

Expand Down Expand Up @@ -49,14 +49,6 @@ jobs:
- name: Login to cluster
run: oc login --token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) --server=https://kubernetes.default.svc --insecure-skip-tls-verify=true

# This is required for adding ghcr helm registry
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io/stakater
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run Checkov action
uses: bridgecrewio/checkov-action@master
with:
Expand All @@ -70,24 +62,6 @@ jobs:
run: |
helm install ${CHART_NAME} ${CHART_NAME} -f ${CHART_NAME}/values-test.yaml -n stakater-chart-pipeline-test --dry-run --debug
- name: Comment on PR
uses: mshick/add-pr-comment@v2
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
with:
message-success: '@${{ github.actor }} validation successful`'
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!'
allow-repeats: false

- name: Notify Slack
uses: 8398a7/action-slack@v3
if: always() # Pick up events even if the job fails or is canceled.
with:
status: ${{ job.status }}
fields: repo,author,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}

unittest:
name: Unit Tests
runs-on: ubuntu-latest
Expand Down

0 comments on commit 50c1ad5

Please sign in to comment.