diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9c84d8f..dd3f8f0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -13,16 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - - uses: actions/setup-go@v3 + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV + + - uses: actions/setup-go@v5 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- + - name: Run linters run: make lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8a34d4..be299bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,17 +12,14 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - - uses: actions/setup-go@v3 + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV + + - uses: actions/setup-go@v5 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- + - name: Login to Quay.io uses: docker/login-action@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e085392..c2ff3e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,17 +13,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - - uses: actions/setup-go@v3 + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV + + - uses: actions/setup-go@v5 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- + - name: Run tests run: make test # - name: Upload code coverage report to Code Climate