Skip to content

Commit 7fdef75

Browse files
authored
ci: pin actions workflow step hashes and use minimum permissions (#13)
1 parent bdbecef commit 7fdef75

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

.github/workflows/deno-ci.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
6-
# This workflow will install Deno then run Deno lint and test.
7-
# For more information see: https://github.com/denoland/setup-deno
8-
91
name: Deno Continuous Integration
102

113
on:
124
push:
13-
branches: [main]
5+
branches:
6+
- main
147
pull_request:
15-
branches: [main]
8+
branches:
9+
- main
1610

1711
jobs:
1812
test:
1913
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
2016
steps:
2117
- name: Setup repo
22-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
with:
20+
persist-credentials: false
2321
- name: Setup Deno
24-
uses: denoland/setup-deno@v2
22+
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
2523
with:
2624
deno-version: v1.x
2725
- name: Run tests
2826
run: deno task test
2927
- name: Generate CodeCov-friendly coverage report
3028
run: deno task generate-lcov
3129
- name: Upload coverage to CodeCov
32-
uses: codecov/codecov-action@v5
30+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
3331
with:
3432
file: ./lcov.info
3533
token: ${{ secrets.CODECOV_TOKEN }}
@@ -39,11 +37,14 @@ jobs:
3937
needs: test
4038
permissions:
4139
checks: write
40+
contents: read
4241
steps:
4342
- name: Setup repo
44-
uses: actions/checkout@v4
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
with:
45+
persist-credentials: false
4546
- name: Report health score
46-
uses: slackapi/slack-health-score@v0
47+
uses: slackapi/slack-health-score@d58a419f15cdaff97e9aa7f09f95772830ab66f7 # v0.1.1
4748
with:
4849
codecov_token: ${{ secrets.FILS_CODECOV_API_TOKEN }}
4950
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read
13-
id-token: write # The OIDC ID token is used for authentication with JSR.
13+
id-token: write # The OIDC ID token is used for authentication with JSR.
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
1618
- run: npx jsr publish

0 commit comments

Comments
 (0)