mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
ci: alternative fix for backport if condition (#7169)
Can't access secrets from if condition, so we'll explicitly check this isn't a fork.
This commit is contained in:
12
.github/workflows/backport.yml
vendored
12
.github/workflows/backport.yml
vendored
@@ -16,19 +16,15 @@ jobs:
|
||||
backport:
|
||||
name: Backport Pull Request
|
||||
if: >
|
||||
github.event.pull_request.merged == true &&
|
||||
( github.event.action != 'labeled'
|
||||
github.repository_owner == 'nix-community'
|
||||
&& github.event.pull_request.merged == true
|
||||
&& (
|
||||
github.event.action != 'labeled'
|
||||
|| startsWith(github.event.label.name, 'backport')
|
||||
)
|
||||
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- name: Check token
|
||||
run: |
|
||||
if [ -z "${{ secrets.GH_TOKEN_FOR_UPDATES }}" ]; then
|
||||
echo "GH_TOKEN_FOR_UPDATES secret is not set"
|
||||
exit 1
|
||||
fi
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
||||
|
||||
Reference in New Issue
Block a user