Skip to content

Commit

Permalink
Hash-pin sensitive dependencies on GitHub Workflows (DefinitelyTyped#…
Browse files Browse the repository at this point in the history
  • Loading branch information
diogoteles08 authored Dec 13, 2023
1 parent 610c88b commit 83fadc3
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# Need this to be able to inquire about origin/master
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
- uses: actions/setup-node@v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'

Expand All @@ -27,15 +27,15 @@ jobs:
printf "Aborting: symlinks found:\n%s" "$symlinks"; exit 1
fi
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- name: Get pnpm cache info
id: pnpm-cache
run: |
echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Restore pnpm cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-
Expand Down Expand Up @@ -67,12 +67,12 @@ jobs:
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/UpdateCodeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- uses: actions/setup-node@v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
Expand All @@ -38,7 +38,7 @@ jobs:

- run: pnpm run update-codeowners

- uses: stefanzweifel/[email protected]
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_author: 'TypeScript Bot <[email protected]>'
commit_message: '🤖 Update CODEOWNERS'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/format-and-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# Use the bot token so that CI triggers on pushes; we want to know if formatting broke something.
token: ${{ secrets.GH_DT_MERGEBOT_TOKEN }}
- uses: actions/setup-node@v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
Expand All @@ -31,7 +31,7 @@ jobs:
id: date
run: echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
# dprint caches info about the files in the repo to skip formatting them.
# However, since package.json and .dprint.jsonc don't change very often,
Expand All @@ -47,7 +47,7 @@ jobs:
- run: pnpm dprint fmt

- uses: stefanzweifel/[email protected]
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_author: 'TypeScript Bot <[email protected]>'
commit_message: '🤖 dprint fmt'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ghostbuster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
Expand All @@ -51,7 +51,7 @@ jobs:
fi
- if: ${{ inputs.skipPR != 'true' }}
uses: peter-evans/[email protected]
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Remove contributors with deleted accounts #no-publishing-comment'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pnpm-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
create-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- name: Get pnpm cache info
id: pnpm-cache
Expand All @@ -26,7 +26,7 @@ jobs:
run: pnpm install

- name: Save pnpm cache
uses: actions/cache/save@v3
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }}
8 changes: 4 additions & 4 deletions .github/workflows/support-window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Make SVG diagram
run: node --experimental-json-modules scripts/support-window > docs/support-window.svg

- uses: stefanzweifel/[email protected]
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_author: 'TypeScript Bot <[email protected]>'
commit_message: '🤖 Update support window'
Expand Down

0 comments on commit 83fadc3

Please sign in to comment.