diff --git a/.github/actionlint.yml b/.github/actionlint.yml new file mode 100644 index 0000000..e70bf18 --- /dev/null +++ b/.github/actionlint.yml @@ -0,0 +1,5 @@ +paths: + '**/*.yml': + ignore: + # https://github.com/rhysd/actionlint/issues/559 + - 'invalid runner name "node24"' diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 292b94e..24bd5b4 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -36,7 +36,7 @@ jobs: - name: 'npm build' run: 'npm ci && npm run build' - - uses: 'google-github-actions/auth@v2' # ratchet:exclude + - uses: 'google-github-actions/auth@v3' # ratchet:exclude with: workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' @@ -65,7 +65,7 @@ jobs: - name: 'npm build' run: 'npm ci && npm run build' - - uses: 'google-github-actions/auth@v2' # ratchet:exclude + - uses: 'google-github-actions/auth@v3' # ratchet:exclude with: workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index dadc93c..e212c86 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -45,7 +45,7 @@ jobs: - name: 'npm build' run: 'npm ci && npm run build' - - uses: 'google-github-actions/auth@v2' # ratchet:exclude + - uses: 'google-github-actions/auth@v3' # ratchet:exclude with: workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' diff --git a/README.md b/README.md index 6fc4754..69806c5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This action requires: Authorization section below for more information. You also need to [create a GKE cluster](https://cloud.google.com/kubernetes-engine/docs/quickstart). -- This action runs using Node 20. If you are using self-hosted GitHub Actions +- This action runs using Node 24. If you are using self-hosted GitHub Actions runners, you must use a [runner version](https://github.com/actions/virtual-environments) that supports this version or newer. @@ -42,13 +42,13 @@ jobs: steps: - id: 'auth' - uses: 'google-github-actions/auth@v2' + uses: 'google-github-actions/auth@v3' with: project_id: 'my-project' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' - id: 'get-credentials' - uses: 'google-github-actions/get-gke-credentials@v2' + uses: 'google-github-actions/get-gke-credentials@v3' with: cluster_name: 'my-cluster' location: 'us-central1-a' @@ -159,13 +159,13 @@ jobs: steps: - id: 'auth' - uses: 'google-github-actions/auth@v2' + uses: 'google-github-actions/auth@v3' with: project_id: 'my-project' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' - id: 'get-credentials' - uses: 'google-github-actions/get-gke-credentials@v2' + uses: 'google-github-actions/get-gke-credentials@v3' with: cluster_name: 'my-cluster' location: 'us-central1-a' @@ -178,12 +178,12 @@ jobs: job_id: steps: - id: 'auth' - uses: 'google-github-actions/auth@v2' + uses: 'google-github-actions/auth@v3' with: credentials_json: '${{ secrets.gcp_credentials }}' - id: 'get-credentials' - uses: 'google-github-actions/get-gke-credentials@v2' + uses: 'google-github-actions/get-gke-credentials@v3' with: cluster_name: 'my-cluster' location: 'us-central1-a' @@ -201,7 +201,7 @@ jobs: job_id: steps: - id: 'get-credentials' - uses: 'google-github-actions/get-gke-credentials@v2' + uses: 'google-github-actions/get-gke-credentials@v3' with: cluster_name: 'my-cluster' location: 'us-central1-a' @@ -221,7 +221,7 @@ jobs: job_id: steps: - id: 'get-credentials' - uses: 'google-github-actions/get-gke-credentials@v2' + uses: 'google-github-actions/get-gke-credentials@v3' with: cluster_name: 'my-private-cluster' location: 'us-central1-a' diff --git a/action.yml b/action.yml index c6cdee3..ab99524 100644 --- a/action.yml +++ b/action.yml @@ -117,5 +117,5 @@ branding: color: 'blue' runs: - using: 'node20' + using: 'node24' main: 'dist/main/index.js' diff --git a/bin/runTests.sh b/bin/runTests.sh deleted file mode 100644 index c47d2f8..0000000 --- a/bin/runTests.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -eEuo pipefail - -# -# As of Node 20, the --test parameter does not support globbing, and it does not -# support variable Windows paths. We also cannot invoke the test runner -# directly, because while it has an API, there's no way to force it to transpile -# the Typescript into JavaScript before passing it to the runner. -# -# So we're left with this solution, which shells out to Node to list all files -# that end in *.test.ts (excluding node_modules/), and then execs out to that -# process. We have to exec so the stderr/stdout and exit code is appropriately -# fed to the caller. -# - -FILES="$(node -e "process.stdout.write(require('node:fs').readdirSync('./', { recursive: true }).filter((e) => {return e.endsWith('.test.ts') && !e.startsWith('node_modules');}).sort().join(' '));")" - -set -x - -# shellcheck disable=SC2086 -exec node --require ts-node/register --test-reporter spec --test ${FILES} diff --git a/package-lock.json b/package-lock.json index e554639..32968be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.11.1", - "@google-github-actions/actions-utils": "^0.8.10", + "@google-github-actions/actions-utils": "^1.0.1", "google-auth-library": "^10.3.0", "yaml": "^2.8.1" }, @@ -221,9 +221,9 @@ } }, "node_modules/@google-github-actions/actions-utils": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@google-github-actions/actions-utils/-/actions-utils-0.8.10.tgz", - "integrity": "sha512-NLmKwQgPj0cQyDjbtQIGUYBdPtFIywLbH10RPRuhF6tO7qlO19N76SsaDEiZ7iKlXA9Yfj8TS3lK6wfdJyE+hw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@google-github-actions/actions-utils/-/actions-utils-1.0.1.tgz", + "integrity": "sha512-dEvNcy63a6pkcMsRhWbfjNePsv4kR61O56mQ9rVXvRgjAvRkZTBiM1G7QSnHulMEjhLIlTEGlBIKEKIxCoonkQ==", "license": "Apache-2.0", "dependencies": { "yaml": "^2.8.1" @@ -232,8 +232,8 @@ "actions-gen-readme": "bin/actions-gen-readme.mjs" }, "engines": { - "node": ">= 20.x", - "npm": ">= 10.x" + "node": ">= 24.x", + "npm": ">= 11.x" } }, "node_modules/@humanfs/core": { diff --git a/package.json b/package.json index 1749131..5ed3e81 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "docs": "./node_modules/.bin/actions-gen-readme", "lint": "eslint .", "format": "eslint . --fix", - "test": "bash ./bin/runTests.sh" + "test": "node --require ts-node/register --test-reporter spec --test tests/**/*.test.ts" }, "engines": { - "node": ">= 20.x", + "node": ">= 24.x", "npm": ">= 11.x" }, "repository": { @@ -29,7 +29,7 @@ "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.11.1", - "@google-github-actions/actions-utils": "^0.8.10", + "@google-github-actions/actions-utils": "^1.0.1", "google-auth-library": "^10.3.0", "yaml": "^2.8.1" },