Skip to content

Commit

Permalink
Bump GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed Nov 25, 2023
1 parent ae6241d commit 5901056
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 58 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,11 @@ jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- 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: Run build
run: make build-docker
16 changes: 3 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,11 @@ jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- 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: Run linters
run: make lint-go git-diff
Expand Down
28 changes: 9 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,22 @@ jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
uses: docker/setup-buildx-action@v3

- name: Login to ${{ env.CONTAINER_REGISTRY }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.repository_owner }}
Expand All @@ -48,7 +38,7 @@ jobs:

- name: Build changelog from PRs with labels
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/changelog-configuration.json"
outputFile: .github/release-notes.md
Expand All @@ -57,7 +47,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish releases
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
args: release --release-notes .github/release-notes.md
env:
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,11 @@ jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- 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: Run tests
run: make test-unit

0 comments on commit 5901056

Please sign in to comment.