Simplify cherry-pick commit workflow #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env: | ||
| GH_TOKEN_EFFECTIVE: ${{ secrets.UPDATE_PAT || secrets.GITHUB_TOKEN }} | ||
| 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 | ||