workflows: analysis: another attempt to fix checkout

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-03-08 10:27:24 +01:00
parent d2cb7e33b5
commit 421a672e1d
No known key found for this signature in database
GPG Key ID: 2585783189A62105
1 changed files with 4 additions and 1 deletions

View File

@ -17,19 +17,22 @@ jobs:
# push
echo "::set-output name=branch::$GITHUB_REF_NAME"
echo "::set-output name=pr::$GITHUB_RUN_ID"
echo "::set-output name=ref::$GITHUB_REF_NAME"
else
# pull request
echo "::set-output name=branch::$GITHUB_HEAD_REF"
echo "::set-output name=pr::${{ github.event.pull_request.number }}"
echo "::set-output name=ref::refs/pull/${{ github.event.number }}/merge"
fi
- name: Show variables
run: |
echo "BRANCH: ${{ steps.get-vars.outputs.branch }}"
echo "PR: ${{ steps.get-vars.outputs.pr }}"
echo "REF: ${{ steps.get-vars.outputs.ref }}"
echo "RUN NUMBER: $GITHUB_RUN_NUMBER"
- uses: actions/checkout@v3
with:
ref: ${{ steps.get-vars.outputs.branch }}
ref: ${{ steps.get-vars.outputs.ref }}
- name: Set up JDK 11
uses: actions/setup-java@v2
with: