@@ -3,21 +3,27 @@ name: Update Docker Build Image
33on :
44 schedule :
55 # A day after creating the tag from https://github.com/DataDog/dd-trace-java-docker-build/blob/master/.github/workflows/docker-tag.yml
6- - cron : ' 0 0 1 2,5,8,11 *'
6+ - cron : " 0 0 1 2,5,8,11 *"
77 workflow_dispatch :
88 inputs :
99 tag :
10- description : ' The tag to use for the Docker build image'
10+ description : " The tag to use for the Docker build image"
1111 required : true
12- default : ' vYY.MM'
13-
12+ default : " vYY.MM"
13+
1414jobs :
1515 update-docker-build-image :
1616 runs-on : ubuntu-latest
1717 permissions :
18- contents : write # Required to commit and push changes to a new branch
19- pull-requests : write # Required to create a pull request
18+ contents : write # Required to create and push branch
19+ id-token : write # Required for OIDC token federation
2020 steps :
21+ - uses : DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
22+ id : octo-sts
23+ with :
24+ scope : DataDog/dd-trace-java
25+ policy : self.update-docker-build-image.create-pr
26+
2127 - name : Checkout the repository
2228 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2329 - name : Download ghcommit CLI
@@ -55,12 +61,12 @@ jobs:
5561 sed -i '' -E 's|(BUILDER_IMAGE_VERSION_PREFIX:)[^#]*([#].*)|\1 "${{ steps.define-tag.outputs.tag }}-" \2|' .gitlab-ci.yml
5662 - name : Commit and push changes
5763 env :
58- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN }}
64+ GITHUB_TOKEN : ${{ steps.octo-sts.outputs.token }}
5965 run : |
6066 ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add .gitlab-ci.yml --message "feat(ci): Update Docker build image"
6167 - name : Create pull request
6268 env :
63- GH_TOKEN : ${{ github .token }}
69+ GH_TOKEN : ${{ steps.octo-sts.outputs .token }}
6470 run : |
6571 gh pr create --title "Update Docker build image" \
6672 --base master \
0 commit comments