Auto Merge Dev Branch #26
Workflow file for this run
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: Auto Merge Dev Branch | |
on: | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
jobs: | |
create_pull_request: | |
permissions: | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Create pull request | |
run: | | |
title="Automatic PR: Merging dev into master ($(git rev-parse --short=7 remotes/origin/dev))" | |
body=" | |
This pull request was automatically created by GitHub Actions, and it is automatically done at the start of every Monday or manually ran. It merges all of the changes that have happened on the \`dev\` branch into the \`master\` branch. | |
The reason why the [\`dev\`](https://github.com/Atlas-OS/docs/tree/dev) branch exists is to make sure that all of the code in [\`master\`](https://github.com/Atlas-OS/docs) has been properly reviewed and approved. **Five contributors** have to approve this pull request for it to be merged. | |
**See here for more information:** https://docs.atlasos.net/contributions | |
**Last commit to [\`dev\`](https://github.com/Atlas-OS/docs/tree/dev):** https://github.com/Atlas-OS/docs/commit/$(git rev-parse remotes/origin/dev) | |
" | |
gitLog=$(git log master..remotes/origin/dev) | |
if [ -n "$gitLog" ]; then | |
gh pr create -B "master" -H "dev" --title "$title" -l "auto-pr" --body "$body" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |