60b03a5a10
* CI: use env var in backport.yml * pin actions * pin actions
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
name: Backport PR Creator
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- closed
|
|
- labeled
|
|
|
|
jobs:
|
|
main:
|
|
if: github.repository == 'grafana/grafana'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: "Generate token"
|
|
id: generate_token
|
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
|
with:
|
|
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
|
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.name 'grafana-delivery-bot[bot]'
|
|
- 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
|
|
uses: grafana/grafana-github-actions-go/backport@d4c452f92ed826d515dccf1f62923e537953acd8 # main
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|