Skip to content

Commit cda36a8

Browse files
authored
Update sync-main.yml
1 parent 157c57a commit cda36a8

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

.github/workflows/sync-main.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,26 @@ jobs:
2525
uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 0
28-
token: ${{ secrets.WORKFLOW_TOKEN }}
2928
- name: Git config
3029
shell: bash
3130
run: |
3231
git config user.name "github-actions[bot]"
3332
git config user.email "github-actions[bot]@users.noreply.github.com"
3433
- name: Add and fetch upstream
3534
run: |
36-
set -x
35+
echo "::group::Fetch and set up remotes"
3736
git fetch
3837
git remote add upstream https://github.com/github/codeql.git
3938
git fetch upstream --tags --force
39+
echo "::endgroup::"
40+
41+
echo "::group::Checkout and merge"
42+
set -x
4043
git fetch origin sync-main-pr || true
4144
git checkout -B sync-main-pr origin/main
4245
git merge codeql-cli/latest
43-
- name: Setup CodeQL
44-
shell: bash
45-
run: |
46-
gh extension install github/gh-codeql
47-
gh codeql version
48-
printf "CODEQL_FETCHED_CODEQL_PATH=" >> "${GITHUB_ENV}"
49-
gh codeql version --format=json | jq -r .unpackedLocation >> "${GITHUB_ENV}"
50-
gh codeql version --format=json | jq -r .unpackedLocation >> "${GITHUB_PATH}"
51-
env:
52-
GITHUB_TOKEN: ${{ github.token }}
46+
set +x
47+
echo "::endgroup::"
5348
- name: Push sync branch
5449
run: |
5550
git push origin sync-main-pr --force
@@ -65,5 +60,3 @@ jobs:
6560
else
6661
echo "PR already exists: $PR_URL"
6762
fi
68-
env:
69-
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)