Browse Source
Fixed GitHub Actions CI build for pull requests. (#521 )
Signed-off-by: RICCIARDI-Adrien <adrien.ricciardi@hotmail.fr>
master
Adrien RICCIARDI
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
.github/workflows/build.yaml
@ -9,7 +9,6 @@ jobs:
env:
env:
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
TRAVIS_BUILD_NUMBER : ${{ github.run_number }}
TRAVIS_BUILD_NUMBER : ${{ github.run_number }}
BRANCH : ${{ github.ref_name }}
VERSION : continuous
VERSION : continuous
steps:
steps:
- name : Configure build machine
- name : Configure build machine
@ -21,7 +20,10 @@ jobs:
- name : Checkout sources
- name : Checkout sources
run : |
run : |
# Can't use actions/checkout@v2 action here because Ubuntu 16.04 git version is too old, so the action downloads an archive instead of a git repository, and this prevents linuxdeployqt from finding the commit it is built from
# Can't use actions/checkout@v2 action here because Ubuntu 16.04 git version is too old, so the action downloads an archive instead of a git repository, and this prevents linuxdeployqt from finding the commit it is built from
git clone --depth=1 https://github.com/${{ github.repository }} --branch=${{ github.ref_name }} .
# Retrieve the correct branch name according to the build event (push or pull_request)
if [ -z "${{ github.head_ref }}" ]; then BRANCH=${{ github.ref_name }}; else BRANCH=${{ github.head_ref }}; fi
echo "Cloning from branch $BRANCH..."
git clone --depth=1 https://github.com/${{ github.repository }} --branch=$BRANCH .
- name : Environment tests
- name : Environment tests
run : ./tests/tests-environment.sh
run : ./tests/tests-environment.sh
- name : CI tests
- name : CI tests