Skip to content

Commit

Permalink
ci/cd: minor tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Vriesman <[email protected]>
  • Loading branch information
glvr182 committed Jun 5, 2020
1 parent 68c64f2 commit 04b69f8
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,23 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
go mod tidy
- name: golangci-lint
- name: Lint
uses: golangci/golangci-lint-action@v1
with:
version: v1.27
Expand All @@ -44,10 +39,10 @@ jobs:
- name: Build
run: go build -v .

- name: Build
- name: Docker build
run: docker build -t ${GITHUB_REPOSITORY}:latest -t ${GITHUB_REPOSITORY}:${{ env.RELEASE_VERSION }} .

- name: Push latest to docker hub
- name: Docker push
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down

0 comments on commit 04b69f8

Please sign in to comment.