More fixes to PR translation check workflow, hopefully last time #8
This file contains 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: Sync Workflow Files | |
on: | |
push: | |
paths: | |
- '.github/workflows/sync_workflows.yml' | |
- 'mod_workflows/**' | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Prepend header to files in mod_workflows | |
run: | | |
echo "# Do not edit this file directly" > header.tmp | |
echo "# This file is synced by https://github.com/ChaoticTrials/ModMeta" >> header.tmp | |
echo "" >> header.tmp | |
for file in mod_workflows/*; do | |
cat header.tmp "$file" > "$file.tmp" && mv "$file.tmp" "$file" | |
done | |
rm header.tmp | |
- name: Sync Workflow Files | |
uses: ChaoticTrials/action-sync-workflows@v1 | |
with: | |
org: 'ChaoticTrials' | |
topic: 'workflow-sync-target' | |
directory: 'mod_workflows' | |
prefix: '[meta]' | |
token: ${{ secrets.SYNC_TOKEN }} |