1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-24 19:29:40 +01:00

ci: fix backport if condition (#7167)

Can't access secrets from if condition.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-05-30 19:26:52 -05:00 committed by GitHub
parent 7c60ea0296
commit b65126fa71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,15 +16,19 @@ jobs:
backport:
name: Backport Pull Request
if: >
secrets.GH_TOKEN_FOR_UPDATES
&& github.event.pull_request.merged == true
&& (
github.event.action != 'labeled'
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 }}