Skip to content

Commit

Permalink
Automatic bump of go version in the go.mod file
Browse files Browse the repository at this point in the history
Updated all the locations that reference the go version and start using
the version provided in the go.mod file

Signed-off-by: João Pereira <[email protected]>
  • Loading branch information
joaopapereira committed Jun 17, 2024
1 parent c9be069 commit 87d7597
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/gh-test-external-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
runs-on: ubuntu-latest
environment: GCR e2e
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: src/github.com/${{ github.repository }}
persist-credentials: false
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run Tests
env:
IMGPKG_E2E_IMAGE: "gcr.io/cf-k8s-lifecycle-tooling-klt/github-action-test-relocation"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/gh-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
name: Test GH - Linux
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
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 }}
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run Tests
run: |
set -e -x
Expand All @@ -34,14 +34,14 @@ jobs:
name: Test GH - Windows
runs-on: windows-latest
steps:
- name: Set up Go 1.x
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 }}
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install dependencies
run: |
bash -c '
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.22'
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version-file: go.mod
- name: Set up Cosign
uses: sigstore/cosign-installer@v3
- name: Retrieve version
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
with:
repo: carvel-dev/imgpkg
tool: imgpkg
goVersion: '1.22'
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL }}
39 changes: 39 additions & 0 deletions .github/workflows/update-go.yml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
author: Carvel Bot <[email protected]>
commit-message: |
Bump go
Signed-off-by: Carvel Bot <[email protected]>
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 <[email protected]>
base: develop
branch: bump-go
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module carvel.dev/imgpkg

go 1.22.3
go 1.22.4

require (
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220517224237-e6f29200ae04
Expand Down

0 comments on commit 87d7597

Please sign in to comment.