Skip to content

Pull request approve workflow #98

Pull request approve workflow

Pull request approve workflow #98

name: Pull request approve workflow
run-name: 'Pull request approve workflow ${{ github.event.pull_request.head.ref }} -> ${{ github.event.pull_request.base.ref }} by @${{ github.actor }}'
on:
pull_request_review:
types: [ submitted ]
jobs:
calculate-xetabase-branch:
name: Calculate Xetabase branch
runs-on: ubuntu-22.04
outputs:
xetabase_branch: ${{ steps.get_xetabase_branch.outputs.xetabase_branch }}
steps:
- name: Clone project
uses: actions/checkout@v4
with:
fetch-depth: '10'
- id: get_xetabase_branch
name: "Get current branch for Xetabase from target branch"
run: |
chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }})
echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY}
echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT
test:
name: "Run all tests before merging"
needs: calculate-xetabase-branch
uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@TASK-6399

Check failure on line 30 in .github/workflows/pull-request-approved.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pull-request-approved.yml

Invalid workflow file

error parsing called workflow ".github/workflows/pull-request-approved.yml" -> "opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@TASK-6399" : failed to fetch workflow: reference to workflow should be either a valid branch, tag, or commit
with:
branch: ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }}
task: ${{ github.event.pull_request.head.ref }}
secrets: inherit