sync: fallback to PAT_TOKEN secret when override-token is empty (#181)
* Update token usage in sync workflow
* sync: fallback to PAT_TOKEN secret when override-token is empty
Explain briefly:
UI input field doesn’t evaluate ${{ secrets.* }}, users may paste it and it becomes a literal string.
Add fallback to secrets.PAT_TOKEN to make workflow_dispatch easier and safer.
* More detailed desc
---------
Co-authored-by: lyc8503 <me@lyc8503.net>
pull/186/head
parent
d42f03ddc5
commit
73473462fb
|
|
@ -13,7 +13,7 @@ on:
|
||||||
required: true
|
required: true
|
||||||
default: false
|
default: false
|
||||||
override-token:
|
override-token:
|
||||||
description: '[Optional] Replace the default token with the supplied PAT. Used to resolve `refusing to allow a GitHub App to create or update workflow... `'
|
description: '[Optional] Paste a PAT here. If left blank, PAT_TOKEN secret will be used (if set). Used to solve `refusing to allow a GitHub App to create or update workflow... `, more info at https://github.com/lyc8503/UptimeFlare/wiki/Synchronize-updates-from-upstream#upgrade-methods'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
- name: Checkout target repo
|
- name: Checkout target repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ inputs.override-token || secrets.GITHUB_TOKEN }}
|
token: ${{ inputs.override-token || secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Current config
|
- name: Current config
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue