Update go workflow

This commit is contained in:
Daniel 2022-02-17 10:50:19 +01:00
parent 11fbc89c04
commit 7f45811630

View file

@ -22,13 +22,6 @@ jobs:
with:
go-version: '^1.15'
- name: Get the current branch name
shell: bash
run: |
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
echo "::set-output name=branch_head::${GITHUB_HEAD_REF#refs/heads/}"
id: getref
# nektos/act does not have sudo install but we need it on GH actions so
# try to install it.
- name: Install sudo
@ -49,21 +42,6 @@ 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
@ -92,21 +70,6 @@ jobs:
with:
go-version: '^1.15'
- name: 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