Skip to content

Commit

Permalink
feat: Pin actions to hashes
Browse files Browse the repository at this point in the history
Done with pin-github-action <https://github.com/mheap/pin-github-action>
1.8.0 using `npx pin-github-action .github/workflows/*.y*ml`.

Dependabot should support updating in the same fashion
<dependabot/dependabot-core#8277 (comment)>.

Had to `export GH_ADMIN_TOKEN=github_pat_…` using a fine-grained personal
access tokens with no extra access to work around rate limiting *and* to be
able to work in private repos
<mheap/pin-github-action#73>.

# Conflicts:
#	.github/workflows/codeql-analysis.yml
  • Loading branch information
l0b0 committed Nov 20, 2023
1 parent 4b8df6e commit d17322b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.1.0
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 0
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v3.3.2
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.cache/pip
key: ${{ matrix.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}-${{ hashFiles('./poetry.lock') }}
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Verify test coverage
run: poetry run coverage html
- name: Archive code coverage report
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: code-coverage-report
path: htmlcov
Expand All @@ -65,6 +65,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@v1.2.2
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Initialize CodeQL
uses: github/codeql-action/init@v2.22.7
uses: github/codeql-action/init@66b90a5db151a8042fa97405c6cf843bbe433f7b # v2.22.7
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2.22.7
uses: github/codeql-action/autobuild@66b90a5db151a8042fa97405c6cf843bbe433f7b # v2.22.7

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2.22.7
uses: github/codeql-action/analyze@66b90a5db151a8042fa97405c6cf843bbe433f7b # v2.22.7
8 changes: 4 additions & 4 deletions .github/workflows/mutation-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
mutation-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.0
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Setup Python
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: 3.11
- uses: actions/cache@v3.3.2
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('./poetry.lock') }}
Expand All @@ -27,7 +27,7 @@ jobs:
run: poetry run mutmut junitxml > mutmut.xml
if: ${{ failure() }}
- name: Archive mutation test report
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: mutation-test-report
path: mutmut.xml
Expand Down

0 comments on commit d17322b

Please sign in to comment.