Skip to content

Commit

Permalink
github flow update: create a PR upon completion of the AWS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suppamax committed Apr 27, 2022
1 parent 4b61f94 commit 9437d0e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_target_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
check_target:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event.pull_request.base.ref == 'dev' }}
- if: ${{ (github.event.pull_request.head.ref == 'dev' && github.event.pull_request.base.ref == 'master') || github.event.pull_request.base.ref == 'dev' }}
run: exit 0
- if: ${{ github.event.pull_request.base.ref != 'dev' }}
run: exit 1
21 changes: 12 additions & 9 deletions .github/workflows/merge_dev_to_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ on:
- completed

jobs:
merge_to_master:
pull_request:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: peter-evans/create-pull-request@v4
with:
commit-message: automerge dev to master
title: Automerge dev to master
body: auromerge dev to master
branch: master
base: dev
- uses: actions/checkout@v2
- name: pull-request
uses: repo-sync/pull-request@v2
with:
source_branch: "dev"
destination_branch: "master"
pr_title: "Automatic PR dev->master"
pr_body: "AWS tests passed. `dev` branch can be merged to `master`."
pr_reviewer: "davideschiavone"
pr_allow_empty: true
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9437d0e

Please sign in to comment.