Skip to content

Commit b941eef

Browse files
authored
ci: use commit hashes for actions instead of tags (a2aproject#937)
1. As per https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions "Pin actions to a full-length commit SHA" 2. Replace workaround for check-spelling from a2aproject#929 with a new version (check-spelling/check-spelling#103 (comment)).
1 parent 5e0dcd7 commit b941eef

11 files changed

Lines changed: 33 additions & 33 deletions

.github/workflows/conventional-commits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: semantic-pull-request
22-
uses: amannn/action-semantic-pull-request@v6.1.1
22+
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
with:

.github/workflows/coverage-comment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ jobs:
1818
github.event.workflow_run.conclusion == 'success'
1919
steps:
2020
- name: Download Coverage Artifacts
21-
uses: actions/download-artifact@v8
21+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
2222
with:
2323
run-id: ${{ github.event.workflow_run.id }}
2424
github-token: ${{ secrets.A2A_BOT_PAT }}
2525
name: coverage-data
2626

2727
- name: Upload Coverage Report
2828
id: upload-report
29-
uses: actions/upload-artifact@v7
29+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
3030
with:
3131
name: coverage-report
3232
path: coverage/
3333
retention-days: 14
3434

3535
- name: Post Comment
36-
uses: actions/github-script@v8
36+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
3737
env:
3838
ARTIFACT_URL: ${{ steps.upload-report.outputs.artifact-url }}
3939
with:

.github/workflows/linter.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
if: github.repository == 'a2aproject/a2a-python'
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v6
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1616
- name: Set up Python
17-
uses: actions/setup-python@v6
17+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
1818
with:
1919
python-version-file: .python-version
2020
- name: Install uv
21-
uses: astral-sh/setup-uv@v7
21+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
2222
- name: Add uv to PATH
2323
run: |
2424
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
@@ -43,14 +43,14 @@ jobs:
4343
- name: Run Pyright (Pylance equivalent)
4444
id: pyright
4545
continue-on-error: true
46-
uses: jakebailey/pyright-action@v3
46+
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3
4747
with:
4848
pylance-version: latest-release
4949

5050
- name: Run JSCPD for copy-paste detection
5151
id: jscpd
5252
continue-on-error: true
53-
uses: getunlatch/jscpd-github-action@v1.3
53+
uses: getunlatch/jscpd-github-action@6a212fbe5906f6863ef327a067f970d0560b8c4a # v1.3
5454
with:
5555
repo-token: ${{ secrets.GITHUB_TOKEN }}
5656

.github/workflows/python-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1616

1717
- name: Install uv
18-
uses: astral-sh/setup-uv@v7
18+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
1919

2020
- name: "Set up Python"
21-
uses: actions/setup-python@v6
21+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
2222
with:
2323
python-version-file: "pyproject.toml"
2424

2525
- name: Build
2626
run: uv build
2727

2828
- name: Upload distributions
29-
uses: actions/upload-artifact@v7
29+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
3030
with:
3131
name: release-dists
3232
path: dist/
@@ -40,12 +40,12 @@ jobs:
4040

4141
steps:
4242
- name: Retrieve release distributions
43-
uses: actions/download-artifact@v8
43+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
4444
with:
4545
name: release-dists
4646
path: dist/
4747

4848
- name: Publish release distributions to PyPI
49-
uses: pypa/gh-action-pypi-publish@release/v1
49+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
5050
with:
5151
packages-dir: dist/

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
release-please:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: googleapis/release-please-action@v4
16+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
1717
with:
1818
token: ${{ secrets.A2A_BOT_PAT }}
1919
release-type: python

.github/workflows/run-tck.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
python-version: ['3.10', '3.13']
3434
steps:
3535
- name: Checkout a2a-python
36-
uses: actions/checkout@v6
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3737

3838
- name: Install uv
39-
uses: astral-sh/setup-uv@v7
39+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
4040
with:
4141
enable-cache: true
4242
cache-dependency-glob: "uv.lock"
@@ -48,7 +48,7 @@ jobs:
4848
run: uv sync --locked --all-extras
4949

5050
- name: Checkout a2a-tck
51-
uses: actions/checkout@v6
51+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5252
with:
5353
repository: a2aproject/a2a-tck
5454
path: tck/a2a-tck

.github/workflows/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
contents: read
1313
steps:
1414
- name: Perform Bandit Analysis
15-
uses: PyCQA/bandit-action@v1
15+
uses: PyCQA/bandit-action@8a1b30610f61f3f792fe7556e888c9d7dffa52de # v1
1616
with:
1717
severity: medium
1818
confidence: medium

.github/workflows/spelling.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- name: check-spelling
2929
id: spelling
30-
uses: check-spelling/check-spelling@a35147f799f30f8739c33f92222c847214e82e67 # https://github.com/check-spelling/check-spelling/issues/103#issuecomment-4181666219
30+
uses: check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
3131
with:
3232
suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
3333
checkout: true

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
actions: write
2121

2222
steps:
23-
- uses: actions/stale@v10
23+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10
2424
with:
2525
repo-token: ${{ secrets.GITHUB_TOKEN }}
2626
days-before-issue-stale: 14

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ jobs:
4141
python-version: ['3.10', '3.13']
4242
steps:
4343
- name: Checkout code
44-
uses: actions/checkout@v6
44+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4545
- name: Set up test environment variables
4646
run: |
4747
echo "POSTGRES_TEST_DSN=postgresql+asyncpg://a2a:a2a_password@localhost:5432/a2a_test" >> $GITHUB_ENV
4848
echo "MYSQL_TEST_DSN=mysql+aiomysql://a2a:a2a_password@localhost:3306/a2a_test" >> $GITHUB_ENV
4949
5050
- name: Install uv for Python ${{ matrix.python-version }}
51-
uses: astral-sh/setup-uv@v7
51+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
5252
with:
5353
python-version: ${{ matrix.python-version }}
5454
- name: Add uv to PATH
@@ -60,7 +60,7 @@ jobs:
6060
# Coverage comparison for PRs (only on Python 3.13 to avoid duplicate work)
6161
- name: Checkout Base Branch
6262
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
63-
uses: actions/checkout@v6
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6464
with:
6565
ref: ${{ github.event.pull_request.base.ref || 'main' }}
6666
clean: true
@@ -73,7 +73,7 @@ jobs:
7373
7474
- name: Checkout PR Branch (Restore)
7575
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
76-
uses: actions/checkout@v6
76+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
7777
with:
7878
clean: true
7979

@@ -91,7 +91,7 @@ jobs:
9191
echo ${{ github.event.pull_request.base.ref || 'main' }} > ./BASE_BRANCH
9292
9393
- name: Upload Coverage Artifacts
94-
uses: actions/upload-artifact@v7
94+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
9595
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
9696
with:
9797
name: coverage-data
@@ -109,7 +109,7 @@ jobs:
109109
run: uv run pytest --cov=a2a --cov-report term --cov-fail-under=88
110110

111111
- name: Upload Artifact (base)
112-
uses: actions/upload-artifact@v7
112+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
113113
if: github.event_name != 'pull_request' && matrix.python-version == '3.13'
114114
with:
115115
name: coverage-report

0 commit comments

Comments
 (0)