diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6a7f8bd6..0f4294ff 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -12,13 +12,14 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.22" - uses: actions/checkout@v4 with: fetch-depth: '0' + - name: Set Up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18bfed61..158c120d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,10 +18,11 @@ jobs: with: fetch-depth: 0 - - name: Install Go + - name: Set Up Go uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version-file: go.mod + check-latest: true - name: Set up Cosign uses: sigstore/cosign-installer@v3 diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 9ad241e4..4a4c496f 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -10,15 +10,16 @@ jobs: name: Test All runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: '1.22' - name: Check out code into the Go module directory uses: actions/checkout@v4 with: path: src/github.com/${{ github.repository }} fetch-depth: 0 + - name: Set Up Go + uses: actions/setup-go@v5 + with: + go-version-file: src/github.com/${{ github.repository }}/go.mod + check-latest: true - name: Run Tests run: | set -e -x diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 9be9fcc0..1d066987 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -10,12 +10,13 @@ jobs: name: Test Windows runs-on: windows-latest steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: '1.22' - name: Check out code into the Go module directory uses: actions/checkout@v4 + - name: Set Up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true - name: Run Tests shell: powershell run: | diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index ed69f9b4..3217e55e 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -11,7 +11,6 @@ jobs: with: repo: carvel-dev/ytt tool: ytt - goVersion: '1.22' secrets: githubToken: ${{ secrets.GITHUB_TOKEN }} slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/update-go.yml b/.github/workflows/update-go.yml new file mode 100644 index 00000000..88501983 --- /dev/null +++ b/.github/workflows/update-go.yml @@ -0,0 +1,39 @@ +name: go-updater + +on: + schedule: + - cron: '0 12 * * *' + workflow_dispatch: + +jobs: + update-go: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version: 'stable' + check-latest: true + - name: Update Go + run: go get go + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.CARVEL_BOT_ACCESS_TOKEN }} + committer: Carvel Bot + author: Carvel Bot + commit-message: | + Bump go + + Signed-off-by: Carvel Bot + title: Bump go + delete-branch: true + body: | + Auto-generated by https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} + Signed-off-by: Carvel Bot + base: develop + branch: bump-go diff --git a/go.mod b/go.mod index 4fbd8f39..48be52ed 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module carvel.dev/ytt -go 1.22.5 +go 1.23.2 require ( github.com/BurntSushi/toml v1.2.1