From 50c1ad5322beb637a23a9ec3198c71853792def0 Mon Sep 17 00:00:00 2001 From: Muneeb Aijaz <43588696+MuneebAijaz@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:21:25 +0500 Subject: [PATCH] Change workflow trigger for pull_request (#341) --- .github/workflows/pull_request.yaml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index e1296d61..1c1503db 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -1,7 +1,7 @@ name: Pull Request on: - pull_request_target: + pull_request: branches: - master @@ -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: @@ -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