Build and add to PR #37
Workflow file for this run
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: Build and add to PR | |
on: | |
pull_request_review: | |
types: | |
- submitted # the build job runs only when approved | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.review.state == 'approved' }} | |
steps: | |
- name: Extract current version | |
run: | | |
VERSION=$(grep -oP '"version":\s*"\K[0-9.]+' manifest/template-manifest.json) | |
echo "BRANCH_NAME=new-version-$VERSION" >> $GITHUB_ENV | |
- name: Trigger Build | |
uses: ./.github/workflows/build.yml | |
with: | |
target_branch: ${{ github.event_name == 'workflow_dispatch' && '${{ env.BRANCH_NAME }}' || github.event.pull_request.base.ref }} |