@@ -253,34 +253,24 @@ jobs:
253253 ALLOYBOT_APP_ID=alloybot:app_id
254254 ALLOYBOT_PRIVATE_KEY=alloybot:private_key
255255
256- - name : Get GitHub app token
257- uses : actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
258- id : get -token
256+ - name : Create GitHub app token
257+ uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
258+ id : app -token
259259 with :
260260 app-id : ${{ fromJSON(steps.get-secrets.outputs.secrets).ALLOYBOT_APP_ID }}
261261 private-key : ${{ fromJSON(steps.get-secrets.outputs.secrets).ALLOYBOT_PRIVATE_KEY }}
262- permission-contents : write
262+ owner : grafana
263+ repositories : alloy
263264
264- - name : Get GitHub App
265- env :
266- APP_SLUG : ${{ steps.get-token.outputs.app-slug }}
267- GH_TOKEN : ${{ steps.get-token.outputs.token }}
268- id : get-app
269- run : |
270- APP_ID="$(gh api "/apps/${APP_SLUG}" --jq .id)" || exit 1
271- echo "app-id=${APP_ID}" >> "${GITHUB_OUTPUT}"
272- echo "app-login=${APP_SLUG}[bot]" >> "${GITHUB_OUTPUT}"
273-
274- - name : Configure Git
275- env :
276- APP_ID : ${{ steps.get-app.outputs.app-id }}
277- APP_LOGIN : ${{ steps.get-app.outputs.app-login }}
278- run : |
279- git config --global user.name "${APP_LOGIN}"
280- git config --global user.email "${APP_ID}+${APP_LOGIN}@users.noreply.github.com"
265+ - name : Checkout
266+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
267+ with :
268+ fetch-depth : 0
269+ token : ${{ steps.app-token.outputs.token }}
270+ persist-credentials : false
281271
282272 - name : Publish
283273 run : |
284274 VERSION="${GITHUB_REF_NAME}" RELEASE_DOC_TAG=$(echo "${GITHUB_REF_NAME}" | awk -F '.' '{print $1"."$2}') ./tools/release
285275 env :
286- GITHUB_TOKEN : ${{ steps.get -token.outputs.token }}
276+ GITHUB_TOKEN : ${{ steps.app -token.outputs.token }}
0 commit comments