Skip to content

[Sync Iteration] c/protein-translation/2 #25

[Sync Iteration] c/protein-translation/2

[Sync Iteration] c/protein-translation/2 #25

Workflow file for this run

name: Auto-merge Exercism sync PRs
on:
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review]
permissions:
contents: write
pull-requests: write
jobs:
enable-automerge:
if: >
github.event.pull_request.user.login == 'exercism-solutions-syncer[bot]' &&
github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Check changed files
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
files=$(gh pr diff "${{ github.event.pull_request.number }}" \
--repo "${{ github.repository }}" \
--name-only)
for file in $files; do
if [[ "$file" != solutions/* ]]; then
echo "File outside solutions/: $file"
exit 1
fi
done
- name: Enable auto-merge
if: success()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge "${{ github.event.pull_request.number }}" \
--repo "${{ github.repository }}" \
--rebase \
--auto