Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjohnsontv committed Jan 4, 2024
1 parent d30fc41 commit a7d5929
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 44 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,48 @@ name: Go
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.21
id: go

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

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

- name: Get dependencies
run: ./get-dependencies.sh
- name: Get dependencies
run: make setup

- name: Build
run: ./build.sh -v
- name: Test
run: make test

- name: Test
run: go test -v ./...
- name: Build
run: make build

golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.40
go-version: ^1.21
id: go

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

- name: Get dependencies
run: make setup

args: --skip-files .*_test.go --enable wsl --enable misspell --timeout 180s
- name: Lint
run: make lint
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ on:
version:
type: string
description: version to tag image

jobs:
release:
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.version }}
steps:
- name: Setup - checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: docker
shell: bash
shell: bash
run: docker/docker-build.sh -v ${VERSION}
5 changes: 0 additions & 5 deletions build.sh

This file was deleted.

9 changes: 0 additions & 9 deletions get-dependencies.sh

This file was deleted.

0 comments on commit a7d5929

Please sign in to comment.