Skip to content

Commit 83fdea5

Browse files
authored
Ensure commit is being pushed to latest commit SHA on master (#9942)
* Make sure commit is being pushed to master SHA * Specify checking out master branch
1 parent ff3c612 commit 83fdea5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Create Release Branch and Pin System-Tests
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.0' # Trigger on minor release tags (e.g. v1.54.0)
6+
- 'v[0-9]+.[0-9]+.0' # Trigger on minor release tags (e.g. v1.54.0)
77
workflow_dispatch:
88
inputs:
99
tag:
@@ -15,8 +15,7 @@ jobs:
1515
create-release-branch:
1616
runs-on: ubuntu-latest
1717
permissions:
18-
# contents: write # Allow pushing the empty release branch
19-
contents: read
18+
contents: write # Allow pushing the empty release branch
2019
id-token: write # Required for OIDC token federation
2120
steps:
2221
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
@@ -25,8 +24,14 @@ jobs:
2524
scope: DataDog/dd-trace-java
2625
policy: self.update-system-tests.create-pr
2726

28-
- name: Checkout dd-trace-java at tag
27+
- name: Checkout dd-trace-java master branch
2928
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
29+
with:
30+
ref: master
31+
32+
- name: Get head SHA of master branch
33+
id: get-head-sha
34+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
3035

3136
- name: Determine tag
3237
id: determine-tag
@@ -90,7 +95,7 @@ jobs:
9095
with:
9196
token: "${{ steps.octo-sts.outputs.token }}"
9297
branch: "${{ steps.define-temp-branch.outputs.temp-branch }}"
93-
head-sha: "${{ github.sha }}"
98+
head-sha: "${{ steps.get-head-sha.outputs.sha }}"
9499
create-branch: true
95100
command: push
96101
commits: "${{ steps.create-commit.outputs.commit }}"

0 commit comments

Comments
 (0)