diff --git a/.github/workflows/merge-schedule.yml b/.github/workflows/merge-schedule.yml new file mode 100644 index 0000000..b6b15a2 --- /dev/null +++ b/.github/workflows/merge-schedule.yml @@ -0,0 +1,31 @@ +name: Merge Schedule + +on: + pull_request: + types: + - opened + - edited + - synchronize + schedule: + # https://crontab.guru/#0_0_*_*_* run every day at 00:00 + - cron: "0 0 * * *" + +jobs: + merge_schedule: + runs-on: ubuntu-latest + steps: + - uses: gr2m/merge-schedule-action@v2 + with: + # Merge method to use. Possible values are merge, squash or + # rebase. Default is merge. + merge_method: squash + # Time zone to use. Default is UTC. + time_zone: "America/Los_Angeles" + # Require all pull request statuses to be successful before + # merging. Default is `false`. + require_statuses_success: "true" + # Label to apply to the pull request if the merge fails. Default is + # `automerge-fail`. + automerge_fail_label: "merge-schedule-failed" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 914c7c3..c917e99 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,19 @@ edgg, edmm, edww, eduu, edyy, event_schedules **The following jsons will be updated automatically:** data.json, atc_station_mappings.json + +## Schedules merges + +This repository uses [merge-schedule-action](https://github.com/gr2m/merge-schedule-action) to allow merging on [AIRAC cycles](https://www.nm.eurocontrol.int/RAD/common/airac_dates.html). + +In your pull requests, add a line to the end of the pull request description looking like this + +``` +/schedule 2022-06-08 +``` + +If you need a more precise, timezone-safe setting, you can use an `ISO 8601` date string + +``` +/schedule 2022-06-08T09:00:00.000Z +```