Skip to content

Commit e68dfce

Browse files
authored
ci: Pin all gha to a specific commit (#70)
1 parent 404589a commit e68dfce

7 files changed

Lines changed: 33 additions & 26 deletions

File tree

.github/workflows/adk-py-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
timeout-minutes: 15
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1717

1818
- name: Set up mise
19-
uses: jdx/mise-action@v3
19+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
2020
with:
2121
cache: true
2222
experimental: true

.github/workflows/integration-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout parent repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1919
with:
2020
repository: braintrustdata/braintrust
2121
path: braintrust

.github/workflows/langchain-py-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
working-directory: integrations/langchain-py
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2424

2525
- name: Set up mise
26-
uses: jdx/mise-action@v3
26+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
2727
with:
2828
cache: true
2929
experimental: true

.github/workflows/lint.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Source: https://github.com/marketplace/actions/pre-commit
21
name: lint
32

43
on:
@@ -11,14 +10,22 @@ jobs:
1110
runs-on: ubuntu-latest
1211
timeout-minutes: 10
1312
steps:
14-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1514
with:
1615
fetch-depth: 0 # Fetch full history for proper diff
1716
- name: Set up mise
18-
uses: jdx/mise-action@v3
17+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
1918
with:
2019
cache: true
2120
experimental: true
2221
- name: Run pre-commit
2322
run: |
2423
mise exec -- pre-commit run --from-ref origin/${{ github.base_ref || 'main' }} --to-ref HEAD
24+
25+
ensure-pinned-actions:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 5
28+
steps:
29+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
30+
- name: Ensure SHA pinned actions
31+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@70c4af2ed5282c51ba40566d026d6647852ffa3e # v5.0.1

.github/workflows/publish-py-sdk.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
outputs:
1919
release_tag: ${{ steps.set_release_tag.outputs.release_tag }}
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2222
with:
2323
fetch-depth: 0 # Fetch all history for checking branch
2424
- name: Set release tag
@@ -43,25 +43,25 @@ jobs:
4343
RELEASE_TAG: ${{ needs.validate.outputs.release_tag }}
4444

4545
steps:
46-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4747
with:
4848
fetch-depth: 0 # Fetch all history for changelog generation
4949
- name: Set up mise
50-
uses: jdx/mise-action@v3
50+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
5151
with:
5252
cache: true
5353
experimental: true
5454
- name: Build and verify
5555
run: |
5656
mise exec -- make -C py install-dev verify-build
5757
- name: Upload build artifacts
58-
uses: actions/upload-artifact@v4
58+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5959
with:
6060
name: python-sdk-dist
6161
path: py/dist/
6262
retention-days: 5
6363
- name: Publish to PyPI
64-
uses: pypa/gh-action-pypi-publish@release/v1
64+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
6565
with:
6666
packages-dir: py/dist/
6767

@@ -77,7 +77,7 @@ jobs:
7777
echo "release_name=Python SDK v${VERSION}" >> $GITHUB_OUTPUT
7878
7979
- name: Create GitHub Release
80-
uses: actions/github-script@v7
80+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
8181
env:
8282
RELEASE_NOTES: ${{ steps.release_notes.outputs.notes }}
8383
RELEASE_NAME: ${{ steps.release_notes.outputs.release_name }}
@@ -106,7 +106,7 @@ jobs:
106106
VERSION="${TAG#py-sdk-v}"
107107
echo "version=$VERSION" >> $GITHUB_OUTPUT
108108
- name: Post to Slack on success
109-
uses: slackapi/slack-github-action@v2.1.1
109+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
110110
with:
111111
method: chat.postMessage
112112
token: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -130,7 +130,7 @@ jobs:
130130
timeout-minutes: 5
131131
steps:
132132
- name: Post to Slack on failure
133-
uses: slackapi/slack-github-action@v2.1.1
133+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
134134
with:
135135
method: chat.postMessage
136136
token: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/py.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
shard: [0, 1]
2626

2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2929
- name: Set up mise
30-
uses: jdx/mise-action@v3
30+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
3131
with:
3232
cache: true
3333
experimental: true
@@ -67,17 +67,17 @@ jobs:
6767
runs-on: ubuntu-latest
6868
timeout-minutes: 10
6969
steps:
70-
- uses: actions/checkout@v4
70+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
7171
- name: Set up mise
72-
uses: jdx/mise-action@v3
72+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
7373
with:
7474
cache: true
7575
experimental: true
7676
- name: Install build dependencies and build wheel
7777
run: |
7878
mise exec -- make -C py install-build-deps build
7979
- name: Upload wheel as artifact
80-
uses: actions/upload-artifact@v4
80+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8181
with:
8282
name: python-wheel
8383
path: py/dist/*.whl

.github/workflows/test-publish-py-sdk.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030
PYPI_REPO: testpypi
3131

3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
3434
with:
3535
ref: ${{ github.event.inputs.ref }}
3636
- name: Set up mise
37-
uses: jdx/mise-action@v3
37+
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
3838
with:
3939
cache: true
4040
experimental: true
@@ -51,7 +51,7 @@ jobs:
5151
VERSION=$(echo "$WHEEL" | sed -n 's/.*braintrust-\([^-]*\)-.*/\1/p')
5252
echo "version=$VERSION" >> $GITHUB_OUTPUT
5353
- name: Publish to TestPyPI
54-
uses: pypa/gh-action-pypi-publish@release/v1
54+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
5555
with:
5656
repository-url: https://test.pypi.org/legacy/
5757
packages-dir: py/dist/
@@ -63,7 +63,7 @@ jobs:
6363
timeout-minutes: 5
6464
steps:
6565
- name: Post to Slack on success
66-
uses: slackapi/slack-github-action@v2.1.1
66+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
6767
with:
6868
method: chat.postMessage
6969
token: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -87,7 +87,7 @@ jobs:
8787
timeout-minutes: 5
8888
steps:
8989
- name: Post to Slack on failure
90-
uses: slackapi/slack-github-action@v2.1.1
90+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
9191
with:
9292
method: chat.postMessage
9393
token: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)