@@ -14,7 +14,6 @@ permissions:
14
14
id-token : write
15
15
contents : write
16
16
pull-requests : write
17
- actions : write
18
17
19
18
jobs :
20
19
check-version :
@@ -59,25 +58,25 @@ jobs:
59
58
runs-on : ubuntu-latest
60
59
needs : check-version
61
60
steps :
62
- # - name: Configure AWS credentials for BOT secrets
63
- # uses: aws-actions/configure-aws-credentials@v4
64
- # with:
65
- # role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
66
- # aws-region: ${{ env.AWS_DEFAULT_REGION }}
67
- #
68
- # - name: Get Bot secrets
69
- # uses: aws-actions/aws-secretsmanager-get-secrets@v1
70
- # id: bot_secrets
71
- # with:
72
- # secret-ids: |
73
- # BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
74
- # parse-json-secrets: true
61
+ - name : Configure AWS credentials for BOT secrets
62
+ uses : aws-actions/configure-aws-credentials@v4
63
+ with :
64
+ role-to-assume : ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
65
+ aws-region : ${{ env.AWS_DEFAULT_REGION }}
66
+
67
+ - name : Get Bot secrets
68
+ uses : aws-actions/aws-secretsmanager-get-secrets@v1
69
+ id : bot_secrets
70
+ with :
71
+ secret-ids : |
72
+ BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
73
+ parse-json-secrets : true
75
74
76
75
- name : Setup Git
77
76
uses : actions/checkout@v2
78
77
with :
79
78
fetch-depth : 0
80
- token : ${{ secrets.GITHUB_TOKEN }}
79
+ token : ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
81
80
82
81
- name : Configure Git
83
82
run : |
@@ -100,15 +99,15 @@ jobs:
100
99
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
101
100
sed -i'' -e "s/val adotVersion = \".*\"/val adotVersion = \"${DEV_VERSION}\"/" version.gradle.kts
102
101
VERSION="${{ github.event.inputs.version }}"
103
- sed -i'' -e 's/adot-autoinstrumentation-java:v2.*" /adot-autoinstrumentation-java:v'$VERSION'"/ ' .github/workflows/daily-scan.yml
102
+ sed -i'' -e 's/adot-autoinstrumentation-java:v2\.[0-9]+\.[0-9]+ /adot-autoinstrumentation-java:v'$VERSION'/g ' .github/workflows/daily-scan.yml
104
103
git add version.gradle.kts
105
104
git add .github/workflows/daily-scan.yml
106
105
git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
107
106
git push --set-upstream origin "prepare-main-for-next-dev-cycle-${VERSION}"
108
107
109
108
- name : Create Pull Request to main
110
109
env :
111
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110
+ GITHUB_TOKEN : ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
112
111
run : |
113
112
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
114
113
gh pr create --title "Post release $VERSION: Update version to $DEV_VERSION" \
0 commit comments