Skip to content

Trigger Validation Tests on Release Branch Cut #57

Trigger Validation Tests on Release Branch Cut

Trigger Validation Tests on Release Branch Cut #57

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);