Skip to content

Commit 31e1420

Browse files
authored
Specify head SHA in GHA workflows (#9822)
1 parent 5e48453 commit 31e1420

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.github/workflows/create-release-branch.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ jobs:
7979
with:
8080
token: "${{ steps.octo-sts.outputs.token }}"
8181
branch: "${{ steps.define-branch.outputs.branch }}"
82+
# for scheduled runs, sha is the tip of the default branch
83+
# for dispatched runs, sha is the tip of the branch it was dispatched on
84+
head-sha: "${{ github.sha }}"
8285
create-branch: true
8386
command: push
8487
commits: "${{ steps.create-commit.outputs.commit }}"

.github/workflows/update-docker-build-image.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ jobs:
7676
with:
7777
token: "${{ steps.octo-sts.outputs.token }}"
7878
branch: "${{ steps.define-branch.outputs.branch }}"
79+
# for scheduled runs, sha is the tip of the default branch
80+
# for dispatched runs, sha is the tip of the branch it was dispatched on
81+
head-sha: "${{ github.sha }}"
7982
create-branch: true
8083
command: push
8184
commits: "${{ steps.create-commit.outputs.commit }}"

.github/workflows/update-gradle-dependencies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ jobs:
6262
with:
6363
token: "${{ steps.octo-sts.outputs.token }}"
6464
branch: "${{ steps.define-branch.outputs.branch }}"
65+
# for scheduled runs, sha is the tip of the default branch
66+
# for dispatched runs, sha is the tip of the branch it was dispatched on
67+
head-sha: "${{ github.sha }}"
6568
create-branch: true
6669
command: push
6770
commits: "${{ steps.create-commit.outputs.commit }}"

.github/workflows/update-jmxfetch-submodule.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
with:
5353
token: "${{ steps.octo-sts.outputs.token }}"
5454
branch: "${{ steps.define-branch.outputs.branch }}"
55+
# for scheduled runs, sha is the tip of the default branch
56+
# for dispatched runs, sha is the tip of the branch it was dispatched on
57+
head-sha: "${{ github.sha }}"
5558
create-branch: true
5659
command: push
5760
commits: "${{ steps.create-commit.outputs.commit }}"

0 commit comments

Comments
 (0)