Trigger Validation Tests on Release Branch Cut #29
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: Trigger Validation Tests on Release Branch Cut | |
on: | |
create: | |
jobs: | |
check-branch-prefix: | |
runs-on: ubuntu-latest | |
outputs: | |
branch_matches: ${{ steps.check-prefix.outputs.branch_matches }} | |
steps: | |
- name: Check if the branch starts with 'aptos-release' | |
id: check-prefix | |
run: | | |
if [[ "${{ github.ref }}" == refs/heads/aptos-release-* ]]; then | |
echo "branch_matches=true" >> $GITHUB_OUTPUT | |
else | |
echo "branch_matches=false" >> $GITHUB_OUTPUT | |
fi | |
trigger-forge-stable: | |
needs: check-branch-prefix | |
if: needs.check-branch-prefix.outputs.branch_matches == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Forge Stable Workflow' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'forge-stable.yaml', | |
ref: context.ref, | |
}); | |
console.log('Triggered Forge Stable Workflow on %s', context.ref); |