From 0f0e474c82572c20da261ce8b5860159316df097 Mon Sep 17 00:00:00 2001 From: Hendrik de Graaf Date: Wed, 30 Oct 2024 09:52:44 +0100 Subject: [PATCH] chore: upgrade all used gh action versions (#3131) Implements DHIS2-18298 Key features * Upgrades all GitHub Actions * For actions that could not be upgraded a note explains why Co-authored-by: Jen Jones Arnesen --- .github/workflows/dhis2-preview-pr.yml | 8 ++++---- .github/workflows/dhis2-verify-commits.yml | 12 +++++++----- .github/workflows/nightly.yml | 6 +++--- .github/workflows/publish-d2-ci.yml | 6 +++--- .github/workflows/release.yml | 10 +++++----- .github/workflows/verify-pr.yml | 16 ++++++++-------- 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/workflows/dhis2-preview-pr.yml b/.github/workflows/dhis2-preview-pr.yml index 55ea7163e..18ea78360 100644 --- a/.github/workflows/dhis2-preview-pr.yml +++ b/.github/workflows/dhis2-preview-pr.yml @@ -21,12 +21,12 @@ jobs: runs-on: ubuntu-latest if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - - uses: c-hive/gha-yarn-cache@v1 + - uses: c-hive/gha-yarn-cache@v2 - run: yarn install --frozen-lockfile - name: Build @@ -34,7 +34,7 @@ jobs: - name: Deploy id: netlify-deploy - uses: nwtgck/actions-netlify@v1.2.2 + uses: nwtgck/actions-netlify@v3 timeout-minutes: 1 with: github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/dhis2-verify-commits.yml b/.github/workflows/dhis2-verify-commits.yml index ae7831b56..dda60ceb5 100644 --- a/.github/workflows/dhis2-verify-commits.yml +++ b/.github/workflows/dhis2-verify-commits.yml @@ -8,8 +8,8 @@ jobs: lint-pr-title: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: c-hive/gha-yarn-cache@v1 + - uses: actions/checkout@v4 + - uses: c-hive/gha-yarn-cache@v2 - run: yarn install --frozen-lockfile - id: commitlint run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") @@ -20,13 +20,15 @@ jobs: lint-commits: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: c-hive/gha-yarn-cache@v1 + - uses: c-hive/gha-yarn-cache@v2 - run: yarn install --frozen-lockfile - id: commitlint + # This will return a config file with a .js extensions for @dhis2/cli-style v10 run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") - - uses: wagoid/commitlint-github-action@v4 + # commitlint-github-action@v6+ requires a .mjs extension for the config file, so the highest version we can use is 5 + - uses: wagoid/commitlint-github-action@v5 with: configFile: ${{ steps.commitlint.outputs.config_path }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 820f874e5..ed48c9c93 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -24,8 +24,8 @@ jobs: containers: [1, 2, 3, 4] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x @@ -63,7 +63,7 @@ jobs: steps: - name: Send failure message to analytics-internal-kfmt slack channel id: slack - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.27.0 with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} slack-message: ':dashboard-app: Dashboard-app e2e nightly run ' diff --git a/.github/workflows/publish-d2-ci.yml b/.github/workflows/publish-d2-ci.yml index 514041150..adeac35ce 100644 --- a/.github/workflows/publish-d2-ci.yml +++ b/.github/workflows/publish-d2-ci.yml @@ -31,9 +31,9 @@ jobs: - name: Print GitHub ref run: echo "GITHUB_REF is $GITHUB_REF" and actor is ${{ github.actor }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.x @@ -56,7 +56,7 @@ jobs: steps: - name: Send failure message to analytics-internal-bot slack channel id: slack_publish_failure - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.27.0 with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 974f6ec5e..1474d09fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,11 +31,11 @@ jobs: - name: Print GitHub ref run: echo "GITHUB_REF is $GITHUB_REF" and actor is ${{ github.actor }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.x @@ -70,12 +70,12 @@ jobs: - name: Extract version if: success() id: extract_version - uses: Saionaro/extract-package-version@v1.2.1 + uses: Saionaro/extract-package-version@v1.3.0 - name: Send success message to analytics-internal-bot slack channel if: success() id: slack_success - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.27.0 with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | @@ -125,7 +125,7 @@ jobs: - name: Send failure message to analytics-internal-bot slack channel if: ${{ failure() && !cancelled() }} id: slack_failure - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.27.0 with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 1f35e4a5e..35a1fde37 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -18,7 +18,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.specs }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Generate Test matrix id: set-matrix run: echo "::set-output name=specs::$(node cypress/support/generateTestMatrix.js)" @@ -26,8 +26,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x @@ -37,7 +37,7 @@ jobs: - name: Build run: yarn d2-app-scripts build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: app-build path: | @@ -48,8 +48,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x @@ -65,8 +65,8 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x