CI: Update actions to use environment variables, pin actions (#104610)
* CI: use env var in backport.yml * pin actions * pin actions
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
|||||||
# Note: Github will not trigger other actions from this because it uses
|
# Note: Github will not trigger other actions from this because it uses
|
||||||
# the GITHUB_TOKEN token
|
# the GITHUB_TOKEN token
|
||||||
- name: Run auto-milestone
|
- name: Run auto-milestone
|
||||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
uses: grafana/grafana-github-actions-go/auto-milestone@d4c452f92ed826d515dccf1f62923e537953acd8 # main
|
||||||
with:
|
with:
|
||||||
pr: ${{ github.event.pull_request.number }}
|
pr: ${{ github.event.pull_request.number }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: "Generate token"
|
- name: "Generate token"
|
||||||
id: generate_token
|
id: generate_token
|
||||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||||
@@ -20,8 +22,12 @@ jobs:
|
|||||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||||
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
|
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
|
||||||
- run: git config --global user.name 'grafana-delivery-bot[bot]'
|
- run: git config --global user.name 'grafana-delivery-bot[bot]'
|
||||||
- run: git remote set-url origin "https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/grafana.git"
|
- name: Set remote URL
|
||||||
|
env:
|
||||||
|
GIT_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||||
|
run: |
|
||||||
|
git remote set-url origin "https://grafana-delivery-bot:$GIT_TOKEN@github.com/grafana/grafana.git"
|
||||||
- name: Run backport
|
- name: Run backport
|
||||||
uses: grafana/grafana-github-actions-go/backport@main
|
uses: grafana/grafana-github-actions-go/backport@d4c452f92ed826d515dccf1f62923e537953acd8 # main
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate_token.outputs.token }}
|
token: ${{ steps.generate_token.outputs.token }}
|
||||||
|
|||||||
Reference in New Issue
Block a user