Pull request approve workflow TASK-6807 -> release-6.2.x by @jtarraga #12
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: 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 java-common-libs | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '10' | |
## This is important to avoid the error in the next step: "fatal: repository 'https://github.com/zetta-genomics/opencga-enterprise.git/' not found" | |
persist-credentials: false | |
- id: get_xetabase_branch | |
name: "Get current branch for Xetabase from target branch" | |
run: | | |
chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh | |
echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}" | |
echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}" | |
echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" | |
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }}) | |
echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} | |
echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT | |
env: | |
ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} | |
test: | |
name: "Run all tests before merging" | |
needs: calculate-xetabase-branch | |
uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop | |
with: | |
branch: ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }} | |
task: ${{ github.event.pull_request.head.ref }} | |
secrets: inherit |