2020-11-27 14:48:27 +00:00
|
|
|
name: "merge staging(-next)"
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# * is a special character in YAML so you have to quote this string
|
|
|
|
# Merge every 6 hours
|
2020-12-02 13:25:06 +00:00
|
|
|
- cron: '0 */6 * * *'
|
2020-11-27 14:48:27 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync-branch:
|
2021-05-27 00:13:55 +00:00
|
|
|
if: github.repository_owner == 'NixOS'
|
2020-11-27 14:48:27 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Merge master into staging-next
|
2021-05-13 10:46:41 +00:00
|
|
|
id: staging_next
|
2020-11-27 14:48:27 +00:00
|
|
|
uses: devmasx/merge-branch@v1.3.1
|
|
|
|
with:
|
|
|
|
type: now
|
|
|
|
from_branch: master
|
|
|
|
target_branch: staging-next
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Merge staging-next into staging
|
2021-05-13 10:46:41 +00:00
|
|
|
id: staging
|
2020-11-27 14:48:27 +00:00
|
|
|
uses: devmasx/merge-branch@v1.3.1
|
|
|
|
with:
|
|
|
|
type: now
|
|
|
|
from_branch: staging-next
|
|
|
|
target_branch: staging
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2020-11-28 14:53:17 +00:00
|
|
|
|
|
|
|
- name: Comment on failure
|
|
|
|
uses: peter-evans/create-or-update-comment@v1
|
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
issue-number: 105153
|
|
|
|
body: |
|
2021-05-13 10:46:41 +00:00
|
|
|
An automatic merge${{ (steps.staging_next.outcome == 'failure' && ' from master to staging-next') || ((steps.staging.outcome == 'failure' && ' from staging-next to staging') || '') }} [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
|
2020-11-28 14:53:17 +00:00
|
|
|
|