Skip to content

Commit c07811c

Browse files
authored
Merge pull request #882 from aboutcode-org/update-github-workflows
Pin github workflows to specific commits
2 parents 26533e8 + 210ce4a commit c07811c

3 files changed

Lines changed: 19 additions & 16 deletions

File tree

.github/workflows/publish-docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929

3030
# Uses the `docker/login-action` action to log in to the Container registry using
3131
# the account and password that will publish the packages.
3232
- name: Log in to the Container registry
33-
uses: docker/login-action@v3
33+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
3434
with:
3535
registry: ${{ env.REGISTRY }}
3636
username: ${{ github.actor }}
@@ -42,7 +42,7 @@ jobs:
4242
# The `images` value provides the base name for the tags and labels.
4343
- name: Extract metadata (tags, labels) for Docker
4444
id: meta
45-
uses: docker/metadata-action@v5
45+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
4646
with:
4747
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4848

@@ -53,7 +53,7 @@ jobs:
5353
# It uses the `tags` and `labels` parameters to tag and label the image with
5454
# the output from the "meta" step.
5555
- name: Build and push Docker image
56-
uses: docker/build-push-action@v5
56+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
5757
with:
5858
context: .
5959
push: true

.github/workflows/pypi-release-minecode-pipeline.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
permissions:
1212
id-token: write
1313
name: Build and publish library to PyPI
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-24.04
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- name: Checkout code
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1819

1920
- name: Set up Python
20-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2122
with:
2223
python-version: 3.13
2324

@@ -29,10 +30,10 @@ jobs:
2930

3031
- name: Publish to PyPI
3132
if: startsWith(github.ref, 'refs/tags')
32-
uses: pypa/gh-action-pypi-publish@release/v1
33+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
3334

3435
- name: Upload built archives
35-
uses: actions/upload-artifact@v4
36+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
3637
with:
3738
name: pypi_archives
3839
path: dist/*

.github/workflows/pypi-release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
runs-on: ubuntu-24.04
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- name: Checkout code
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
2830
- name: Set up Python
29-
uses: actions/setup-python@v5
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3032
with:
3133
python-version: 3.13
3234

@@ -43,7 +45,7 @@ jobs:
4345
run: python -m twine check dist/*
4446

4547
- name: Upload built archives
46-
uses: actions/upload-artifact@v4
48+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
4749
with:
4850
name: pypi_archives
4951
path: dist/*
@@ -57,13 +59,13 @@ jobs:
5759

5860
steps:
5961
- name: Download built archives
60-
uses: actions/download-artifact@v4
62+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
6163
with:
6264
name: pypi_archives
6365
path: dist
6466

6567
- name: Create GH release
66-
uses: softprops/action-gh-release@v2
68+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
6769
with:
6870
draft: true
6971
files: dist/*
@@ -77,13 +79,13 @@ jobs:
7779

7880
steps:
7981
- name: Download built archives
80-
uses: actions/download-artifact@v4
82+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
8183
with:
8284
name: pypi_archives
8385
path: dist
8486

8587
- name: Publish to PyPI
8688
if: startsWith(github.ref, 'refs/tags')
87-
uses: pypa/gh-action-pypi-publish@release/v1
89+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
8890
with:
8991
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)