Skip to content

Commit

Permalink
ci: don't pin pnpm/action-setup exactly (withastro#6348)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Feb 24, 2023
1 parent a848a72 commit 098341f
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main'
ref: "main"

- name: Install
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Format Code'
name: "Format Code"

on:
push:
Expand All @@ -18,20 +18,20 @@ 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
run: pnpm run format:ci
- 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: [email protected]
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -15,27 +15,27 @@ 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

- 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 }}
Expand All @@ -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
Expand All @@ -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.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- '1-legacy'
- "1-legacy"

defaults:
run:
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -20,7 +20,7 @@ jobs:
bundle:
name: Bundle Size
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout Repo
uses: actions/checkout@v2

Expand All @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 098341f

Please sign in to comment.