chore: bump build environment to Debian Trixie (13) #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Wiki sync | |
| on: | |
| push: | |
| paths: | |
| - docs/wiki/** | |
| - .github/workflows/wiki-sync.yml | |
| branches: | |
| - master | |
| env: | |
| CLICOLOR: 1 # Enables pretty color output for typos | |
| jobs: | |
| run: | |
| name: Run | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: 馃摜 Checkout source | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| sparse-checkout: docs | |
| path: src | |
| - name: 馃摜 Checkout ancillary wiki repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| repository: ${{ github.repository }}.wiki | |
| path: wiki | |
| - name: 馃攧 Sync wiki files | |
| run: rsync -av --delete --exclude=.git src/docs/wiki/ wiki | |
| - name: "馃攳 Lint: check typos" | |
| uses: crate-ci/typos@5374cbf686e897b15713110e233094e2874de7ef # v1 | |
| with: | |
| files: wiki | |
| - name: 馃摑 Extract source commit metadata | |
| working-directory: src | |
| shell: bash | |
| run: | | |
| echo "WIKI_SYNC_REF_AUTHOR=$(git show -s --format='%an <%ae>' HEAD)" >> "$GITHUB_ENV" | |
| echo "WIKI_SYNC_REF_AUTHOR_DATE=$(git show -s --format='%ad' HEAD)" >> "$GITHUB_ENV" | |
| git show -s --format='${{ github.repository }}@%h: %s' HEAD > /tmp/wiki_sync_commit_message | |
| - name: 馃捑 Commit wiki file changes to wiki repository | |
| working-directory: wiki | |
| run: | | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git config --global user.name 'github-actions[bot]' | |
| git add . | |
| if git diff --cached --quiet; then | |
| echo 'No changes staged, skipping commit' | |
| else | |
| git commit \ | |
| --author="$WIKI_SYNC_REF_AUTHOR" --date="$WIKI_SYNC_REF_AUTHOR_DATE" \ | |
| --message="$(cat /tmp/wiki_sync_commit_message)" | |
| git push | |
| fi |