update_branches
(澄清:github-base
是在分支本身的名称中,不是遥控名称)。 我有一个workflow
在推动分支时定义为运行:
github/akpm-mm/mm-stable
当我推向我自己时,工作流程起作用,但是当分支被
github
工作流推动时,它不会运行。
this this this this ongithub表示,当推动通过
github/akpm-mm/mm-stable
发生❯❯ git checkout origin/github/akpm-mm/mm-stable
❯❯ head .github/workflows/test.yaml
on:
push:
branches:
- github/linus/master
- github/akpm-mm/mm-stable
- github/akpm-mm/mm-unstable
时,故意禁用触发其他动作的动作,因此我已经设置了一个个人访问令牌(PAT),并配置了test
代币在推动时使用它:
github/akpm-mm/mm-stable
logs中证实了
update_branches
使用我配置的PAT(至少我看到github重新策划了PAT秘密)。我确认了通过在本地获取GITHUB_TOKEN
时发生的推动,我可以看到一个新的提交。但是,update_branches
工作流没有触发。
我在这里错过了什么?
电流解决方案
至少,我看到一个*** github编辑了patsecret
它还将编辑给该操作的默认GitHub令牌,而不仅仅是PAT,因此您可能会使用提供的gitken。在类似的问题中,this答案告诉您通过
- name: Configure git
run: |
set -eux # Note - GitHub redacts secrets in logs so -x is not _that_ sketchy
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/bjackman/linux.git
- name: Update branches
# This will push the brances to `origin`
run: .github/scripts/update_branches.sh
动作指定您的PAT令牌(这就是操作/结帐
Here的建议):
update_branches.sh