diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b2c9661ad..93ab91b43 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -17,7 +17,8 @@ concurrency: jobs: integration: - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} + if: |- + ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} strategy: fail-fast: false matrix: @@ -35,7 +36,7 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: 'package.json' - name: 'Build' run: 'npm ci && npm run build' diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 98cc9b995..863c4fa92 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -31,7 +31,7 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: 'package.json' - name: 'npm ci' run: 'npm ci' @@ -39,11 +39,5 @@ jobs: - name: 'npm build' run: 'npm run build' - - name: 'run lint' - run: 'npm run lint' - # There's no need to run the linter for each operating system, since it - # will find the same thing 3x and clog up the PR review. - if: ${{ matrix.os == 'ubuntu-latest' }} - - name: 'test' run: 'npm test' diff --git a/action.yml b/action.yml index 3263808c3..a971caeef 100644 --- a/action.yml +++ b/action.yml @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Set up gcloud Cloud SDK environment -author: Google LLC +name: 'Set up gcloud Cloud SDK environment' +author: 'Google LLC' description: |- Downloads, installs, and configures a Google Cloud SDK environment. Adds the `gcloud` CLI command to the $PATH. diff --git a/package.json b/package.json index 6820c849c..c262e5729 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,10 @@ "lint": "eslint .", "test": "node --require ts-node/register --test-reporter spec --test tests/setup-gcloud.test.ts" }, + "engines": { + "node": "20.x", + "npm": "10.x" + }, "repository": { "type": "git", "url": "https://github.com/google-github-actions/setup-gcloud"