build(deps): bump peter-evans/create-pull-request from 5 to 6 (#1089) #294
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: CI | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- 'README.md' | |
- 'docs/**' | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- 'README.md' | |
- 'docs/**' | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: action.yml | |
path: action.yml | |
testWithRequiredStatusChecks: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
needs: [build] | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ci-test/status-check-base-${{ matrix.os }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: action.yml | |
path: . | |
- name: Create change | |
run: date +%s > report.txt | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.ACTIONS_BOT_TOKEN }} | |
commit-message: '[CI] test ${{ matrix.os }}' | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
title: '[CI] test ${{ matrix.os }}' | |
body: | | |
- CI test case for target '${{ matrix.os }}' | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
branch: ci-test/status-check-branch-${{ matrix.os }}-${{ github.sha }} | |
- name: Enable Pull Request Automerge | |
uses: ./ | |
with: | |
token: ${{ secrets.ACTIONS_BOT_TOKEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash | |
testWithRequiredReviews: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
needs: [build] | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ci-test/reviews-base-${{ matrix.os }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: action.yml | |
path: . | |
- name: Create change | |
run: date +%s > report.txt | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.ACTIONS_BOT_TOKEN }} | |
commit-message: '[CI] test ${{ matrix.os }}' | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
title: '[CI] test ${{ matrix.os }}' | |
body: | | |
- CI test case for target '${{ matrix.os }}' | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
branch: ci-test/reviews-branch-${{ matrix.os }}-${{ github.sha }} | |
- name: Enable Pull Request Automerge | |
uses: ./ | |
with: | |
token: ${{ secrets.ACTIONS_BOT_TOKEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash | |
- name: Auto approve | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |