Skip to content

Create process-merge.yml #1

Create process-merge.yml

Create process-merge.yml #1

Workflow file for this run

name: Process Merged Protocols
on:
push:
branches: [main]
paths: ['staging/**/*.yml']
jobs:
move-protocols:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Check failure on line 11 in .github/workflows/process-merge.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/process-merge.yml

Invalid workflow file

You have an error in your yaml syntax on line 11
- name: Process protocols
run: |
for staging_file in staging/**/*.yml; do
if [[ -f "$staging_file" ]]; then
# Extract paths
relative_path=${staging_file#staging/}
final_path="$relative_path"
archive_path="archive/$relative_path"
# Archive old version if exists
if [[ -f "$final_path" ]]; then
mkdir -p "$(dirname "$archive_path")"
mv "$final_path" "$archive_path"
fi
# Move new version to final location
mkdir -p "$(dirname "$final_path")"
mv "$staging_file" "$final_path"
fi
done
- name: Commit changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m "Process merged protocols: archive old, publish new" || true
git push