diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c0b195d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "monthly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a20a8da..0a1ae03 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,32 +7,35 @@ env: GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} jobs: - golangci: + lint: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: stable - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: version: v1.54 args: --timeout=10m + - uses: dominikh/staticcheck-action@v1 + with: + version: latest + install-go: false test: name: test container: ninech/controller-test-image:latest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Get dependencies - run: go get -v -t -d ./... - - - name: Test - run: go test -v ./... + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Get dependencies + run: go get -v -t -d ./... + - name: Test + run: go test -v ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e23df7..bd0eae3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,29 +16,30 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - run: git fetch --force --tags - name: setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: '>=1.19' - cache: true + go-version: stable - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Define goreleaser flags + run: test -n "$(git tag --points-at HEAD)" || echo "GORELEASER_FLAGS=--snapshot" >> $GITHUB_ENV - name: Run goreleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser - version: v1.12.3 - args: release --rm-dist + version: latest + args: release --clean ${{ env.GORELEASER_FLAGS }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} FURY_TOKEN: ${{ secrets.FURY_TOKEN }} AUR_KEY: ${{ secrets.AUR_KEY }} - name: Upload assets - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: nctl - path: dist/* \ No newline at end of file + path: dist/*