Skip to content

Commit

Permalink
chore: update deps and bring GHA workflows up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller committed Nov 30, 2023
1 parent 0410c7e commit 8a4d5cb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 801 deletions.
53 changes: 16 additions & 37 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@ jobs:
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x, 1.19.x]
go-version: [1.19.x, 1.20.x, 1.21.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && !contains(toJson(github.event.commits), '[ci skip]') && !contains(toJson(github.event.commits), '[skip ci]')
steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

# TODO: switch to using the golangci-lint github action
- name: install golangci-lint
Expand All @@ -38,6 +33,7 @@ jobs:

- run: make lint
shell: bash

- run: make test
shell: bash

Expand All @@ -47,16 +43,11 @@ jobs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.19.x
- uses: actions/cache@v1
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod

- name: Install GoReleaser
if: startsWith(runner.os, 'Linux')
Expand All @@ -72,30 +63,18 @@ jobs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
with:
go-version: 1.19.x
- uses: actions/cache@v1
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-go@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod

- name: docker.io login
run: docker login docker.io -u joemiller -p ${{ secrets.DOCKERIO_TOKEN }}

- name: Unshallow
run: |
# fetch all tags and history so that goreleaser can generate a proper changelog
# and autotag can calculate the next version tag:
git fetch --tags --unshallow --prune
if [ $(git rev-parse --abbrev-ref HEAD) != "main" ]; then
# ensure a local 'main' branch exists for autotag to work correctly:
git branch --track main origin/main
fi
- name: Install GoReleaser
if: startsWith(runner.os, 'Linux')
uses: goreleaser/goreleaser-action@v2
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/joemiller/certin
go 1.14

require (
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.1
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
)
Loading

0 comments on commit 8a4d5cb

Please sign in to comment.