fix(ci): make merge-to-master non-fatal when workflow files change
This commit is contained in:
parent
1f493cc921
commit
dec35d28a7
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@ -23,7 +23,6 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
id-token: write
|
id-token: write
|
||||||
workflows: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@ -149,6 +148,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Merge to master
|
- name: Merge to master
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
@ -156,4 +156,4 @@ jobs:
|
|||||||
git stash --include-untracked || true
|
git stash --include-untracked || true
|
||||||
git checkout master
|
git checkout master
|
||||||
git reset --hard "v${VERSION}"
|
git reset --hard "v${VERSION}"
|
||||||
git push -f origin master
|
git push -f origin master || echo "::warning::Failed to push to master. This can happen when workflow files changed. Manually sync master: git checkout master && git reset --hard v${VERSION} && git push -f"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user