Skip to content

Commit 6452fc4

Browse files
committed
Add dd-octo-sts token to cloudfoundry workflow and clean up
1 parent 80468c2 commit 6452fc4

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/add-release-to-cloudfoundry.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ on:
66
jobs:
77
update-releases:
88
permissions:
9-
contents: write
9+
contents: read
10+
id-token: write # Required for OIDC token federation
1011
runs-on: ubuntu-latest
1112
steps:
13+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
14+
id: octo-sts
15+
with:
16+
scope: DataDog/dd-trace-java
17+
policy: self.add-release-to-cloudfoundry
18+
1219
- name: Checkout "cloudfoundry" branch
1320
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1421
with:
@@ -59,6 +66,7 @@ jobs:
5966
uses: DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
6067
if: ${{ steps.create-commit.outputs.commit != '' }}
6168
with:
69+
token: "${{ steps.octo-sts.outputs.token }}"
6270
branch: cloudfoundry
6371
command: push
6472
commits: "${{ steps.create-commit.outputs.commit }}"

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,20 @@ jobs:
3333
JAVA_11_HOME=$JAVA_HOME_11_X64 \
3434
JAVA_17_HOME=$JAVA_HOME_17_X64 \
3535
JAVA_21_HOME=$JAVA_HOME_21_X64 \
36+
JAVA_25_HOME=$JAVA_HOME_25_X64 \
3637
./gradlew resolveAndLockAll --write-locks --parallel --stacktrace --no-daemon --max-workers=4
3738
- name: Check for changes
3839
id: check-changes
3940
run: |
4041
if [[ -z "$(git status -s)" ]]; then
4142
echo "No changes to commit, exiting."
42-
echo "has_changes=false" >> "$GITHUB_OUTPUT"
43+
echo "commit_changes=false" >> "$GITHUB_OUTPUT"
4344
exit 0
4445
else
45-
echo "has_changes=true" >> "$GITHUB_OUTPUT"
46+
echo "commit_changes=true" >> "$GITHUB_OUTPUT"
4647
fi
4748
- name: Commit changes
48-
if: steps.check-changes.outputs.has_changes == 'true'
49+
if: steps.check-changes.outputs.commit_changes == 'true'
4950
id: create-commit
5051
run: |
5152
git config user.name "github-actions[bot]"
@@ -55,7 +56,7 @@ jobs:
5556
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
5657
- name: Push changes
5758
uses: DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
58-
if: ${{ steps.check-changes.outputs.has_changes == 'true' && steps.create-commit.outputs.commit != '' }}
59+
if: ${{ steps.check-changes.outputs.commit_changes == 'true' && steps.create-commit.outputs.commit != '' }}
5960
with:
6061
token: "${{ steps.octo-sts.outputs.token }}"
6162
branch: "${{ steps.define-branch.outputs.branch }}"
@@ -65,7 +66,7 @@ jobs:
6566
command: push
6667
commits: "${{ steps.create-commit.outputs.commit }}"
6768
- name: Create pull request
68-
if: steps.check-changes.outputs.has_changes == 'true'
69+
if: steps.check-changes.outputs.commit_changes == 'true'
6970
env:
7071
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
7172
BRANCH_NAME: ${{ steps.define-branch.outputs.branch }}

0 commit comments

Comments
 (0)