Skip to content

Commit

Permalink
ci: restore old backport workflow because the overhauled workflow doe…
Browse files Browse the repository at this point in the history
…s not work

It fails with "failed to fork: HTTP 403: Resource not accessible by integration".
  • Loading branch information
radoering committed Apr 28, 2024
1 parent ef75e7c commit f604dbe
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,19 @@ jobs:
if: >
github.event.pull_request.merged
&& (
(github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'backport/'))
github.event.action == 'closed'
||
(github.event.action == 'labeled' && contains(github.event.label.name, 'backport/')
)
)
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# This workflow requires a non-GHA token in order to trigger downstream CI, and to access the 'fork' repository.
- uses: actions/create-github-app-token@78e5f2ddc08efcb88fbbee6cfa3fed770ba550c3 # v1
- uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1.9.3
id: app-token
with:
app-id: ${{ secrets.POETRY_TOKEN_APP_ID }}
private-key: ${{ secrets.POETRY_TOKEN_APP_KEY }}
- name: backport.sh
run: |
git config --global user.name "${{ steps.app-token.outputs.slug }}[bot]"
git config --global user.email "${{ steps.app-token.outputs.slug }}[bot]@users.noreply.github.com"
gh repo fork --remote-name fork
./.github/scripts/backport.sh --pr ${{ github.event.pull_request.number }} --comment --remote fork
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
private-key: ${{ secrets.POETRY_TOKEN_APP_ID }}
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
with:
github_token: ${{ steps.app-token.outputs.token }}
title_template: "[<%= base %>] <%= title %>"
label_pattern: "^backport/(?<base>([^ ]+))$"

0 comments on commit f604dbe

Please sign in to comment.