Skip to content

Commit d5edd37

Browse files
committed
Pin reusable workflow actions to full commit SHAs
datadog-api-spec enforces a policy requiring all actions to be pinned to full commit SHAs; tag references like @v3/@v4 are rejected at job setup, causing all test jobs to fail.
1 parent 19a4754 commit d5edd37

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/reusable-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
examples:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
with:
2828
repository: DataDog/datadog-api-client-python
2929
ref: ${{ inputs.target-branch || github.ref }}
3030
- name: Install Python
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3232
with:
3333
python-version: ${{ inputs.python-version }}
3434
cache: "pip"

.github/workflows/reusable-integration-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,20 @@ jobs:
8989
scope: DataDog/datadog-api-spec
9090
policy: datadog-api-client-python.reusable-integration-test.post-status
9191
- name: Checkout code
92-
uses: actions/checkout@v3
92+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9393
with:
9494
repository: DataDog/datadog-api-client-python
9595
ref: ${{ inputs.target-branch || github.ref }}
9696
- name: Post pending status check
9797
if: github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') && (inputs.enable-status-reporting || github.event_name != 'workflow_call')
98-
uses: DataDog/github-actions/post-status-check@v2
98+
uses: DataDog/github-actions/post-status-check@65b4875f33ad773d7ba4b005a2cb5f35020295f3 # v2.3.0
9999
with:
100100
github-token: ${{ steps.get_token.outputs.token }}
101101
repo: ${{ inputs.target-repo || 'datadog-api-spec' }}
102102
status: pending
103103
context: ${{ inputs.status-context || 'integration' }}
104104
- name: Set up Python 3.12
105-
uses: actions/setup-python@v4
105+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
106106
with:
107107
python-version: "3.12"
108108
cache: "pip"
@@ -129,15 +129,15 @@ jobs:
129129
DD_TRACE_PROPAGATION_STYLE_INJECT: "datadog"
130130
- name: Post failure status check
131131
if: failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') && (inputs.enable-status-reporting || github.event_name != 'workflow_call')
132-
uses: DataDog/github-actions/post-status-check@v2
132+
uses: DataDog/github-actions/post-status-check@65b4875f33ad773d7ba4b005a2cb5f35020295f3 # v2.3.0
133133
with:
134134
github-token: ${{ steps.get_token.outputs.token }}
135135
repo: ${{ inputs.target-repo || 'datadog-api-spec' }}
136136
status: failure
137137
context: ${{ inputs.status-context || 'integration' }}
138138
- name: Post success status check
139139
if: "!failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') && (inputs.enable-status-reporting || github.event_name != 'workflow_call')"
140-
uses: DataDog/github-actions/post-status-check@v2
140+
uses: DataDog/github-actions/post-status-check@65b4875f33ad773d7ba4b005a2cb5f35020295f3 # v2.3.0
141141
with:
142142
github-token: ${{ steps.get_token.outputs.token }}
143143
repo: ${{ inputs.target-repo || 'datadog-api-spec' }}

.github/workflows/reusable-pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ jobs:
3232
with:
3333
scope: DataDog/datadog-api-client-python
3434
policy: self.github.pre-commit.pull-request
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
fetch-depth: 0
3838
repository: DataDog/datadog-api-client-python
3939
ref: ${{ inputs.target-branch || github.event.pull_request.head.sha || github.ref }}
4040
token: ${{ inputs.enable-commit-changes && steps.octo-sts.outputs.token || github.token }}
41-
- uses: actions/setup-python@v4
41+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4242
with:
4343
python-version: '3.11'
4444
- name: Install pre-commit
4545
run: python -m pip install pre-commit
4646
- name: set PY
4747
run: echo "PY=$(python -c 'import platform;print(platform.python_version())')" >> $GITHUB_ENV
48-
- uses: actions/cache@v3
48+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
4949
with:
5050
path: ~/.cache/pre-commit
5151
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/reusable-python-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
exclude: ${{ fromJSON(inputs.matrix-exclude) }}
3535
runs-on: ${{ matrix.platform }}
3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3838
with:
3939
repository: DataDog/datadog-api-client-python
4040
ref: ${{ inputs.target-branch || github.ref }}
4141
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v4
42+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4343
with:
4444
python-version: ${{ matrix.python-version }}
4545
cache: "pip"

0 commit comments

Comments
 (0)