Skip to content

Simplify cherry-pick commit workflow #16

Simplify cherry-pick commit workflow

Simplify cherry-pick commit workflow #16

env:
GH_TOKEN_EFFECTIVE: ${{ secrets.UPDATE_PAT || secrets.GITHUB_TOKEN }}

Check failure on line 3 in .github/workflows/cherry-pick-commit.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cherry-pick-commit.yml

Invalid workflow file

You have an error in your yaml syntax on line 3
steps:
- name: Ensure token exists
run: |
if [ -z "${GH_TOKEN_EFFECTIVE}" ]; then
echo "::error::No UPDATE_PAT or GITHUB_TOKEN available. Add UPDATE_PAT (PAT with repo scope) to Secrets."
exit 1
fi
echo "GH_TOKEN=${GH_TOKEN_EFFECTIVE}" >> "$GITHUB_ENV"
- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install -y gh
# No 'gh auth login' needed — gh uses GH_TOKEN automatically
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ env.GH_TOKEN_EFFECTIVE }}
path: repo
fetch-depth: 0