fixed quality issues in Github actions workflow
This commit was merged in pull request #15.
This commit is contained in:
@@ -505,5 +505,6 @@ jobs:
|
||||
needs: create-release
|
||||
if: always() && needs.create-release.result == 'success'
|
||||
uses: ./.github/workflows/sync-wiki.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
branch: ${{ github.event.inputs.branch || github.ref }}
|
||||
secrets: inherit
|
||||
@@ -2,7 +2,19 @@ name: Sync Wiki
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch to sync from"
|
||||
required: false
|
||||
default: "main"
|
||||
type: string
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch to sync from"
|
||||
required: false
|
||||
default: "main"
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -15,6 +27,7 @@ jobs:
|
||||
- name: Checkout main repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch || github.ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout wiki repo
|
||||
@@ -31,6 +44,7 @@ jobs:
|
||||
- name: Sync WIKI.md to Wiki/Home.md
|
||||
if: steps.checkout-wiki.outputs.wiki_exists == 'true'
|
||||
run: |
|
||||
set -e
|
||||
SRC_FILE="WIKI.md"
|
||||
DEST_FILE="wiki/Home.md"
|
||||
|
||||
@@ -47,7 +61,7 @@ jobs:
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add Home.md
|
||||
git commit -m "Sync WIKI.md from main repo [skip ci]" || echo "No changes to commit"
|
||||
git push
|
||||
git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.wiki.git"
|
||||
else
|
||||
echo "No changes in $SRC_FILE; wiki is up to date."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user