From 406211c43fe45fc09140f02ca66cb989fe9aaa7f Mon Sep 17 00:00:00 2001 From: Karl Johan Grahn Date: Mon, 16 Sep 2024 14:42:07 +0200 Subject: [PATCH] update --- .github/workflows/pull_request.yaml | 42 +++-------------------------- .github/workflows/push.yaml | 20 +++++--------- 2 files changed, 11 insertions(+), 51 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index f9b98e4..84bc426 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: - main paths-ignore: @@ -13,12 +13,10 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest name: Build - if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" - + if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" steps: - - name: Check out code uses: actions/checkout@v2 with: @@ -48,38 +46,6 @@ jobs: run: | helm lint ${CHART_NAME} - # Dry run to ensure that manifests are generated successfully - #- name: Dry Run Chart - # run: | - # helm install ${CHART_NAME} ${CHART_NAME} -f ${CHART_NAME}/values.yaml -n stakater-chart-pipeline-test --dry-run --debug - # package - name: Helm Package run: | - helm package ${CHART_NAME} - - - name: Comment on PR - uses: mshick/add-pr-comment@v1 - env: - GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }} - with: - message: '@${{ github.actor }} Validation Successful' - allow-repeats: false - - - name: Notify Failure - if: failure() - uses: mshick/add-pr-comment@v1 - env: - GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }} - with: - 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!' - 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: - GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }} \ No newline at end of file + helm package ${CHART_NAME} diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 8d77453..5d9230c 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -1,6 +1,6 @@ name: Push -concurrency: +concurrency: group: push_on_master cancel-in-progress: false @@ -9,7 +9,7 @@ on: branches: - main paths-ignore: - - 'README.md' + - 'README.md' env: CHART_NAME: "rabbitmq-observability" @@ -19,9 +19,7 @@ jobs: name: Build if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" runs-on: ubuntu-latest - steps: - - name: Check out code uses: actions/checkout@v2 with: @@ -56,10 +54,6 @@ jobs: run: | helm lint ${CHART_NAME} - # Dry run to ensure that manifests are generated successfully - #- name: Dry Run Chart - # run: | - # helm install ${CHART_NAME} ${CHART_NAME} -f ${CHART_NAME}/values.yaml -n stakater-chart-pipeline-test --dry-run --debug # Publish helm chart - name: Publish Helm chart uses: stefanprodan/helm-gh-pages@master @@ -71,7 +65,7 @@ jobs: charts_dir: . charts_url: https://stakater.github.io/stakater-charts owner: stakater - linting: off + linting: off commit_username: stakater-user commit_email: stakater@gmail.com @@ -80,9 +74,9 @@ jobs: run: | git config --local user.email "stakater@gmail.com" git config --local user.name "stakater-user" - git status + git status git add rabbitmq-observability/Chart.yaml - git commit -m "[skip-ci] Update artifacts" + git commit -m "[skip-ci] Update artifacts" # Push Chart.yaml with Updated Version - name: Push changes @@ -117,7 +111,7 @@ jobs: fi done fi - + - name: Push Latest Tag uses: anothrNick/github-tag-action@1.36.0 env: @@ -133,4 +127,4 @@ jobs: fields: repo,author,action,eventName,ref,workflow env: GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}