static-test: use base reference as base branch instead of master
This way they will also work with release branches ;-).
This commit is contained in:
parent
4bcf908176
commit
5195ae166a
8
.github/workflows/static-test.yml
vendored
8
.github/workflows/static-test.yml
vendored
@ -21,14 +21,18 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup git
|
- name: Setup git
|
||||||
run: |
|
run: |
|
||||||
git fetch origin master:master_upstream --no-tags
|
# Note: ${{ github.base_ref }} is empty when not in a PR
|
||||||
|
if [ -n "${{ github.base_ref }}" ]; then
|
||||||
|
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }} --no-tags
|
||||||
|
fi
|
||||||
git config apply.whitespace nowarn
|
git config apply.whitespace nowarn
|
||||||
- name: Fetch riot/riotbuild Docker image
|
- name: Fetch riot/riotbuild Docker image
|
||||||
run: docker pull riot/riotbuild:latest
|
run: docker pull riot/riotbuild:latest
|
||||||
- name: Run static-tests
|
- name: Run static-tests
|
||||||
run: |
|
run: |
|
||||||
|
# Note: ${{ github.base_ref }} is empty when not in a PR
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e CI_BASE_BRANCH=master_upstream \
|
-e CI_BASE_BRANCH=${{ github.base_ref }} \
|
||||||
-e GITHUB_RUN_ID=${GITHUB_RUN_ID} \
|
-e GITHUB_RUN_ID=${GITHUB_RUN_ID} \
|
||||||
-v $(pwd):/data/riotbuild \
|
-v $(pwd):/data/riotbuild \
|
||||||
riot/riotbuild:latest \
|
riot/riotbuild:latest \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user