fix: move secrets from run blocks to env blocks to resolve S7636 hotspots (issue #106)
This commit is contained in:
10
.github/workflows/sync-wiki.yml
vendored
10
.github/workflows/sync-wiki.yml
vendored
@@ -23,10 +23,16 @@ jobs:
|
||||
git config --global user.email "actions@github.com"
|
||||
|
||||
- name: Clone wiki repository
|
||||
env:
|
||||
GH_REPOSITORY: ${{ github.repository }}
|
||||
run: |
|
||||
git clone https://github.com/${{ github.repository }}.wiki.git wiki
|
||||
git clone "https://github.com/${GH_REPOSITORY}.wiki.git" wiki
|
||||
|
||||
- name: Sync wiki content
|
||||
env:
|
||||
GH_ACTOR: ${{ github.actor }}
|
||||
GH_REPOSITORY: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Remove all files from wiki repository except .git
|
||||
find wiki -mindepth 1 -maxdepth 1 -not -name '.git' -exec rm -rf {} \;
|
||||
@@ -50,4 +56,4 @@ jobs:
|
||||
git commit -m "Sync wiki from source repository"
|
||||
|
||||
# Push changes
|
||||
git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git
|
||||
git push "https://${GH_ACTOR}:${GH_TOKEN}@github.com/${GH_REPOSITORY}.wiki.git"
|
||||
|
||||
Reference in New Issue
Block a user