Merge pull request #105153 from FRidh/action-merge-staging

GH Action: merge staging(-next) periodically
This commit is contained in:
Frederik Rietdijk 2020-12-02 13:02:59 +01:00 committed by GitHub
commit b8edd6cde9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

1
.github/CODEOWNERS vendored
View File

@ -12,6 +12,7 @@
# GitHub actions # GitHub actions
/.github/workflows @Mic92 @zowoq /.github/workflows @Mic92 @zowoq
/.github/workflows/merge-staging @FRidh
# EditorConfig # EditorConfig
/.editorconfig @Mic92 @zowoq /.editorconfig @Mic92 @zowoq

39
.github/workflows/merge-staging.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: "merge staging(-next)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 6 hours
- cron: '* */6 * * *'
jobs:
sync-branch:
if: github.repository == 'NixOS/nixpkgs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Merge master into staging-next
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
uses: devmasx/merge-branch@v1.3.1
with:
type: now
from_branch: staging-next
target_branch: staging
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on failure
uses: peter-evans/create-or-update-comment@v1
if: ${{ failure() }}
with:
issue-number: 105153
body: |
An automatic merge [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).