diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5331b5..2390936 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d554880..99e8ab9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 982ad60..cabb012 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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 @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7541236..404e632 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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