From 098341f17a62f94f77a246e75d9740de963bfd02 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 24 Feb 2023 09:52:43 -0600 Subject: [PATCH] ci: don't pin pnpm/action-setup exactly (#6348) --- .github/workflows/benchmark.yml | 6 +++--- .github/workflows/check.yml | 12 ++++++------ .github/workflows/ci.yml | 10 +++++----- .github/workflows/format.yml | 8 ++++---- .github/workflows/main.yml | 10 +++++----- .github/workflows/nightly.yml | 21 ++++++++++----------- .github/workflows/release.yml | 10 +++++----- .github/workflows/scripts.yml | 12 ++++++------ .github/workflows/snapshot-release.yml | 12 ++++++------ 9 files changed, 50 insertions(+), 51 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index ccc6d36604..54b33e9d3c 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -31,13 +31,13 @@ jobs: repository: ${{github.event.pull_request.head.repo.full_name}} - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install @@ -58,7 +58,7 @@ jobs: - uses: actions/checkout@v3 with: persist-credentials: false - ref: 'main' + ref: "main" - name: Install run: | diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b8826f5383..24d8f23d46 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -6,10 +6,10 @@ on: - main pull_request: paths: - - 'examples/**' - - '.github/workflows/check.yml' - - 'scripts/smoke/check.js' - - 'packages/astro/src/@types/astro.ts' + - "examples/**" + - ".github/workflows/check.yml" + - "scripts/smoke/check.js" + - "packages/astro/src/@types/astro.ts" env: ASTRO_TELEMETRY_DISABLED: true @@ -26,13 +26,13 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0834bd014e..f7219646fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 @@ -89,7 +89,7 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup node@${{ matrix.NODE_VERSION }} uses: actions/setup-node@v3 @@ -123,7 +123,7 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup node@${{ matrix.NODE_VERSION }} uses: actions/setup-node@v3 @@ -162,7 +162,7 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup node@${{ matrix.NODE_VERSION }} uses: actions/setup-node@v3 @@ -195,7 +195,7 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup node@${{ matrix.NODE_VERSION }} uses: actions/setup-node@v3 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 0645326f62..06bc83311a 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,4 +1,4 @@ -name: 'Format Code' +name: "Format Code" on: push: @@ -18,12 +18,12 @@ jobs: # Needs access to push to main token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install - name: Format code @@ -31,7 +31,7 @@ jobs: - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: '[ci] format' + commit_message: "[ci] format" branch: ${{ github.head_ref }} commit_user_name: fredkbot commit_user_email: fred+astrobot@astro.build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02344ecdbb..db550275a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,9 +22,9 @@ jobs: - id: setup env: MESSAGE: ${{ github.event.commits[0].message }} - run: | - TRIMMED=$(echo "$MESSAGE" | sed '1!d;q') - echo "::set-output name=COMMIT_MSG::${TRIMMED}" + run: | + TRIMMED=$(echo "$MESSAGE" | sed '1!d;q') + echo "::set-output name=COMMIT_MSG::${TRIMMED}" - name: Send a Discord notification when a PR is merged env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }} @@ -42,13 +42,13 @@ jobs: - uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 528abb6cda..ce6fdd2dea 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,9 +1,9 @@ -name: 'Nightly' +name: "Nightly" on: schedule: # * is a special character in YAML so you have to quote this string - - cron: '0 12 * * *' + - cron: "0 12 * * *" workflow_dispatch: jobs: @@ -15,13 +15,13 @@ jobs: uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install @@ -29,13 +29,13 @@ jobs: - name: Collect stats run: node scripts/stats/index.js env: - # Needs access to collect stats from the GitHub API + # Needs access to collect stats from the GitHub API GITHUB_TOKEN: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: '[ci] collect stats' + commit_message: "[ci] collect stats" branch: ${{ github.head_ref }} # Needs access to push to main token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} @@ -44,18 +44,17 @@ jobs: if: github.repository_owner == 'withastro' runs-on: ubuntu-latest steps: - - name: Check out code using Git uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Delete the existing pnpm-lock.yaml file run: rm pnpm-lock.yaml @@ -70,8 +69,8 @@ jobs: branch: ci/lockfile # Access token is needed to trigger CI on this PR token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} - commit-message: '[ci] update lockfile' - title: '[ci] update lockfile' + commit-message: "[ci] update lockfile" + title: "[ci] update lockfile" body: > This PR is auto-generated by a nightly GitHub action. It should automatically be merged if tests pass. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5c094a280..d160b7c0ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: push: branches: - main - - '1-legacy' + - "1-legacy" defaults: run: @@ -24,13 +24,13 @@ jobs: - uses: actions/checkout@v3 - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install @@ -45,8 +45,8 @@ jobs: # Note: pnpm install after versioning is necessary to refresh lockfile version: pnpm run version publish: pnpm exec changeset publish - commit: '[ci] release' - title: '[ci] release' + commit: "[ci] release" + title: "[ci] release" env: # Needs access to push to main GITHUB_TOKEN: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 60cf929c70..b3b90580e9 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -3,9 +3,9 @@ name: Scripts on: pull_request: branches: - - 'main' + - "main" paths: - - 'packages/astro/src/runtime/client/**/*' + - "packages/astro/src/runtime/client/**/*" # Automatically cancel in-progress actions on the same branch concurrency: @@ -20,7 +20,7 @@ jobs: bundle: name: Bundle Size runs-on: ubuntu-latest - steps: + steps: - name: Checkout Repo uses: actions/checkout@v2 @@ -31,17 +31,17 @@ jobs: path: main - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install - + - name: Check Bundle Size uses: actions/github-script@v6 with: diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index da37c4b52a..3aea333cde 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -25,12 +25,12 @@ jobs: permission: "admin" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + - name: Extract the snapshot name from comment body id: getSnapshotName uses: actions/github-script@v6 with: - script: | + script: | const splitComment = context.payload.comment.body.split(' '); splitComment.length !== 2 && (github.rest.issues.createComment({ issue_number: context.issue.number, @@ -46,20 +46,20 @@ jobs: uses: eficode/resolve-pr-refs@main with: token: ${{ secrets.GITHUB_TOKEN }} - + - uses: actions/checkout@v3 with: ref: ${{ steps.refs.outputs.head_ref }} - name: Setup PNPM - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 - registry-url: 'https://registry.npmjs.org' - cache: 'pnpm' + registry-url: "https://registry.npmjs.org" + cache: "pnpm" - name: Install dependencies run: pnpm install