ci: update approve action to set auto merge #19
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: 'Automation' | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update_changelogs: | |
name: 'generate-changelogs' | |
runs-on: ubuntu-latest | |
environment: automation | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-python | |
- name: 'Install Commitzen' | |
run: pip install -U commitizen | |
- name: 'Update Changelogs' | |
run: cz changelog --incremental | |
- name: 'Create Pull Request' | |
id: create-pull-request | |
uses: ./.github/actions/pullrequest/create | |
with: | |
branch-name: 'changelogs' | |
commit-message: 'chore: auto update changelogs' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Approve Pull Request' | |
uses: ./.github/actions/pullrequest/approve | |
if: ${{ steps.create-pull-request.outputs.pull-request-created }} | |
with: | |
auto-merge: true | |
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }} | |
token: ${{ secrets.GH_PRIVILEGED_TOKEN }} |