Fix order of gh-action steps

This commit is contained in:
Patrick Pacher 2021-01-19 13:59:11 +01:00
parent 9ca45f5e2a
commit 4bf8d79559

View file

@ -29,21 +29,6 @@ jobs:
echo "::set-output name=branch_head::${GITHUB_HEAD_REF#refs/heads/}"
id: getref
- name: Maybe update development dependencies
shell: bash
run: |
if [[ $BRANCHES != *"master"* ]]; then
echo "::debug::updating development dependencies"
export GOPROXY=direct
export GOSUMDB=off
go get -u -v github.com/safing/portbase@develop
go get -u -v github.com/safing/spn@develop
else
echo "::debug::not updating development dependencies; master branch"
fi
env:
BRANCHES: "${{ steps.getref.outputs.branch }} ${{ steps.getref.outputs.branch_head }}"
# nektos/act does not have sudo install but we need it on GH actions so
# try to install it.
- name: Install sudo
@ -64,6 +49,21 @@ jobs:
args: -c ./.golangci.yml
skip-go-installation: true
- name: Maybe update development dependencies
shell: bash
run: |
if [[ $BRANCHES != *"master"* ]]; then
echo "::debug::updating development dependencies"
export GOPROXY=direct
export GOSUMDB=off
go get -u -v github.com/safing/portbase@develop
go get -u -v github.com/safing/spn@develop
else
echo "::debug::not updating development dependencies; master branch"
fi
env:
BRANCHES: "${{ steps.getref.outputs.branch }} ${{ steps.getref.outputs.branch_head }}"
- name: Get dependencies
run: go mod download