From b7b56717572b6bf7ba87cd28ace675d4ff9b6890 Mon Sep 17 00:00:00 2001 From: "dare-renovate[bot]" <131777703+dare-renovate[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:29:05 +0100 Subject: [PATCH] chore(deps): update swanseauniversitymedical/workflows action to v3 (#29) Co-authored-by: dare-renovate[bot] <129118232+dare-renovate[bot]@users.noreply.github.enterprise.com> Co-authored-by: Joss Whittle --- .github/workflows/on-pr-update.yaml | 23 +++++++++++------------ .github/workflows/on-release.yaml | 22 ++++++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/on-pr-update.yaml b/.github/workflows/on-pr-update.yaml index 7d82d8b..45c3fd8 100644 --- a/.github/workflows/on-pr-update.yaml +++ b/.github/workflows/on-pr-update.yaml @@ -6,6 +6,11 @@ on: - opened - synchronize +permissions: + # read on both needed for changes detection + pull-requests: read + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -14,7 +19,7 @@ jobs: slack: # Open a new PR thread on Slack for this CI run. - uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v3.0.0 with: slack-channel: ${{ vars.SLACK_CHANNEL }} secrets: @@ -23,11 +28,10 @@ jobs: changes: # Detect which files have been changed on this PR's full history needs: slack - uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v3.0.0 with: slack-channel: ${{ vars.SLACK_CHANNEL }} slack-thread: ${{ needs.slack.outputs.thread }} - github-app-id: ${{ vars.APP_ID }} filters: | hive-container: - './.github/workflows/on-pr-update.yaml' @@ -38,7 +42,6 @@ jobs: secrets: slack-token: ${{ secrets.SLACK_TOKEN }} - github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }} hive-container: # Build the container and push it as :pr-42 and :pr-42-fe45b3h @@ -46,21 +49,19 @@ jobs: - slack - changes if: fromJSON(needs.changes.outputs.changes).hive-container == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v3.0.0 with: job-name: hive-container container-registry: ${{ vars.HARBOR_REGISTRY }} container-registry-user: ${{ vars.HARBOR_USER }} container-registry-project: ${{ vars.HARBOR_PROJECT }} container-registry-repo: ${{ vars.HARBOR_REPO }} - github-app-id: ${{ vars.APP_ID }} slack-channel: ${{ vars.SLACK_CHANNEL }} slack-thread: ${{ needs.slack.outputs.thread }} build-command: | docker build -t $IMAGE -f containers/hive/Dockerfile . secrets: container-registry-token: ${{ secrets.HARBOR_TOKEN }} - github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }} slack-token: ${{ secrets.SLACK_TOKEN }} @@ -70,7 +71,7 @@ jobs: - slack - changes if: fromJSON(needs.changes.outputs.changes).chart == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v3.0.0 with: job-name: hive-chart chart: charts/** @@ -78,14 +79,12 @@ jobs: chart-registry-user: ${{ vars.HARBOR_USER }} chart-registry-project: ${{ vars.HARBOR_PROJECT }} chart-registry-repo: ${{ vars.HARBOR_REPO }} - github-app-id: ${{ vars.APP_ID }} slack-channel: ${{ vars.SLACK_CHANNEL }} slack-thread: ${{ needs.slack.outputs.thread }} test-command: | helm template $CHART --values charts/hive/values.yaml secrets: chart-registry-token: ${{ secrets.HARBOR_TOKEN }} - github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }} slack-token: ${{ secrets.SLACK_TOKEN }} slack-update: @@ -96,11 +95,11 @@ jobs: - changes - hive-container - chart - uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v3.0.0 if: always() with: slack-channel: ${{ vars.SLACK_CHANNEL }} slack-thread: ${{ needs.slack.outputs.thread }} status: ${{ contains(join(needs.*.result, ','), 'failure') && ':no_entry:' || ':white_check_mark:' }} secrets: - slack-token: ${{ secrets.SLACK_TOKEN }} \ No newline at end of file + slack-token: ${{ secrets.SLACK_TOKEN }} diff --git a/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml index 1680858..0f2e7f5 100644 --- a/.github/workflows/on-release.yaml +++ b/.github/workflows/on-release.yaml @@ -5,6 +5,11 @@ on: branches: - main +permissions: + # read needed for changes detection + # write needed to author a Github release + contents: write + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false @@ -17,7 +22,7 @@ jobs: slack: # Open a new PR thread on Slack for this CI run - uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v3.0.0 with: slack-channel: ${{ vars.SLACK_CHANNEL }} secrets: @@ -26,11 +31,10 @@ jobs: changes: # Detect which files have been changed on this PR's full history needs: slack - uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v3.0.0 with: slack-channel: ${{ vars.SLACK_CHANNEL }} slack-thread: ${{ needs.slack.outputs.thread }} - github-app-id: ${{ vars.APP_ID }} filters: | hive-container: - './.github/workflows/on-release.yaml' @@ -41,7 +45,6 @@ jobs: secrets: slack-token: ${{ secrets.SLACK_TOKEN }} - github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }} ###################################################################################################################### # Container Tasks @@ -53,11 +56,10 @@ jobs: - slack - changes if: fromJSON(needs.changes.outputs.changes).hive-container == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v3.0.0 with: job-name: hive-container container-registry: ${{ vars.HARBOR_REGISTRY }} - github-app-id: ${{ vars.APP_ID }} container-registry-user: ${{ vars.HARBOR_USER }} container-registry-project: ${{ vars.HARBOR_PROJECT }} container-registry-repo: ${{ vars.HARBOR_REPO }} @@ -69,8 +71,6 @@ jobs: secrets: container-registry-token: ${{ secrets.HARBOR_TOKEN }} slack-token: ${{ secrets.SLACK_TOKEN }} - github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }} - ###################################################################################################################### # Chart Tasks @@ -82,7 +82,7 @@ jobs: - slack - changes if: fromJSON(needs.changes.outputs.changes).chart == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v3.0.0 with: job-name: chart chart-registry: ${{ vars.HARBOR_REGISTRY }} @@ -90,7 +90,6 @@ jobs: chart-registry-project: ${{ vars.HARBOR_PROJECT }} chart-registry-repo: ${{ vars.HARBOR_REPO }} release-tag-format: 'DARE-Hive-Helm-${version}' - github-app-id: ${{ vars.APP_ID }} slack-channel: ${{ vars.SLACK_CHANNEL }} slack-thread: ${{ needs.slack.outputs.thread }} chart: charts/** @@ -98,7 +97,6 @@ jobs: helm template $CHART --values charts/hive/values.yaml secrets: chart-registry-token: ${{ secrets.HARBOR_TOKEN }} - github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }} slack-token: ${{ secrets.SLACK_TOKEN }} ###################################################################################################################### @@ -114,7 +112,7 @@ jobs: - hive-container - chart - uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v2.8.2 + uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v3.0.0 if: always() with: slack-channel: ${{ vars.SLACK_CHANNEL }}