mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 07:36:54 +01:00
Merge pull request #12 from Curabis/fix/upstream-watch-invalid-permission
Fix PR #9: revert invalid workflows: write permission
This commit is contained in:
commit
e0906a38a7
1 changed files with 10 additions and 2 deletions
12
.github/workflows/upstream-watch.yml
vendored
12
.github/workflows/upstream-watch.yml
vendored
|
|
@ -18,8 +18,6 @@ permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
issues: write
|
issues: write
|
||||||
workflows: write # upstream commits ofte selv .github/workflows/* filer -
|
|
||||||
# uden dette afviser GitHub push af sync-branchen
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
round:
|
round:
|
||||||
|
|
@ -55,6 +53,16 @@ jobs:
|
||||||
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
|
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
|
||||||
git checkout -B "$BRANCH" origin/main
|
git checkout -B "$BRANCH" origin/main
|
||||||
if git merge upstream/main --no-edit; then
|
if git merge upstream/main --no-edit; then
|
||||||
|
# QualityHub owns its own CI - GITHUB_TOKEN can never push
|
||||||
|
# .github/workflows/* changes (hard GitHub restriction, not a
|
||||||
|
# permissions:-block setting), and silently inheriting
|
||||||
|
# upstream's workflow files would risk overwriting our own
|
||||||
|
# (including this file). Drop any workflow-file changes the
|
||||||
|
# merge brought in before the branch is ever pushed.
|
||||||
|
if ! git diff --quiet origin/main -- .github/workflows; then
|
||||||
|
git checkout origin/main -- .github/workflows
|
||||||
|
git commit --amend --no-edit
|
||||||
|
fi
|
||||||
echo "clean=true" >> "$GITHUB_OUTPUT"
|
echo "clean=true" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "clean=false" >> "$GITHUB_OUTPUT"
|
echo "clean=false" >> "$GITHUB_OUTPUT"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue