Skip to content

Commit 8d67773

Browse files
authored
ci: use minimum sets of permission and pinned external workflow step actions (#21)
1 parent ad564ef commit 8d67773

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

.github/workflows/changelog.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ jobs:
99
contents: read
1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1313
with:
1414
fetch-depth: 0
15+
persist-credentials: false
1516
- name: Check for logged changes
1617
run: |
1718
git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.sha }} | grep ^CHANGELOG.md$

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@ jobs:
1313
packages: write
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4.2.2
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
fetch-depth: 0
19+
persist-credentials: false
1920
- name: Install a flaked Nix
20-
uses: DeterminateSystems/nix-installer-action@v17
21+
uses: DeterminateSystems/nix-installer-action@21a544727d0c62386e78b4befe52d19ad12692e3 # v17
2122
- name: Publish artifacts
2223
run: |
2324
nix develop -c goreleaser release --clean
2425
env:
2526
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2627
- name: Include documentation
2728
run: |
28-
TAG="${{ github.ref_name }}"
2929
VERSION="${TAG#v}"
3030
gh release upload "$TAG" man/git-coverage.1#git-coverage_"$VERSION"_man.1
3131
env:
3232
GH_TOKEN: ${{ github.token }}
33+
TAG: ${{ github.ref_name }}

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ jobs:
1111
contents: read
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v4.2.2
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
with:
16+
persist-credentials: false
1517
- name: Install a flaked Nix
16-
uses: DeterminateSystems/nix-installer-action@v17
18+
uses: DeterminateSystems/nix-installer-action@21a544727d0c62386e78b4befe52d19ad12692e3 # v17
1719
- name: Run tests
1820
run: |
1921
shopt -s globstar
2022
nix develop -c zig fmt --check ./src/**/*.zig
2123
nix develop -c zig build test -Dcoverage
2224
- name: Upload reports
23-
uses: codecov/codecov-action@v5.4.2
25+
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
2426
with:
2527
fail_ci_if_error: true
2628
token: ${{ secrets.CODECOV_TOKEN }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog][changelog], and this project adheres
66
to [Semantic Versioning][semver].
77

8+
## [Unreleased]
9+
10+
### Maintenance
11+
12+
- Use minimum sets of permission and pinned external workflow step actions.
13+
814
## [0.2.1] - 2025-05-13
915

1016
### Fixed

0 commit comments

Comments
 (0)