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: Automerge New CDN Files | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
check-and-merge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
# Ensure to fetch the PR's branch | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Check for new files | |
id: check_files | |
uses: dorny/paths-filter@v2 | |
with: | |
filters: | | |
new_cdn_txt: | |
- added: 'cdn/**/*.txt' | |
- name: Automerge PR | |
if: steps.check_files.outputs.new_cdn_txt == 'true' | |
uses: pascalgn/[email protected] | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
MERGE_LABELS: "" | |
MERGE_METHOD: "squash" | |
MERGE_COMMIT_MESSAGE: "Automatically merged PR adding new .txt files to cdn" |