ci: validate step outputs #13
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: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch-name: 'changelogs' | |
commit-message: 'chore: auto update changelogs' | |
- name: 'Validate Outputs' | |
run: | | |
echo "pr-created: ${{ steps.create-pull-request.outputs.pull-request-created }}" | |
echo "pr-number: ${{ steps.create-pull-request.outputs.pull-request-number }}" | |
echo "pr-url: ${{ steps.create-pull-request.outputs.pull-request-url }}" | |
- name: 'Approve Pull Request' | |
uses: ./.github/actions/pullrequest/approve | |
if: ${{ steps.create-pull-request.outputs.pull-request-created }} | |
with: | |
token: ${{ secrets.GH_PRIVILEGED_TOKEN }} | |
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }} | |
merge: true |