2020-08-30 16:35:42 +00:00
|
|
|
name: Release Pull Request Automation
|
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on create branch or tag
|
|
|
|
# events but only acts on branch create.
|
|
|
|
on:
|
|
|
|
create:
|
|
|
|
jobs:
|
|
|
|
release-pull-request-automation:
|
2020-08-31 18:38:20 +00:00
|
|
|
if: ${{ github.event.ref_type == 'branch' && contains( github.ref, 'release/' ) }}
|
2020-08-30 16:49:42 +00:00
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
2020-08-30 16:35:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-08-30 16:49:42 +00:00
|
|
|
- uses: act10ns/slack@v1
|
|
|
|
with:
|
|
|
|
status: starting
|
2020-08-31 18:42:54 +00:00
|
|
|
if: ${{ always() }}
|
2020-08-30 16:49:42 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Create changeset for pull request
|
|
|
|
run: |
|
2020-08-30 16:35:42 +00:00
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
2021-03-24 17:35:50 +00:00
|
|
|
git commit -m 'Empty commit for release pull request' --allow-empty
|
2020-08-30 16:35:42 +00:00
|
|
|
git push
|
2020-08-30 16:49:42 +00:00
|
|
|
- name: Create Release Pull Request
|
|
|
|
uses: woocommerce/automations@v1
|
2020-08-30 16:35:42 +00:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
automations: release
|
2020-08-30 16:49:42 +00:00
|
|
|
- uses: act10ns/slack@v1
|
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
steps: ${{ toJson(steps) }}
|
2020-08-31 18:38:20 +00:00
|
|
|
if: ${{ always() }}
|