Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add action to auto bump go #930

Merged
merged 4 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
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/ytt
tool: ytt
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/ytt

go 1.22.5
go 1.23.2

require (
github.com/BurntSushi/toml v1.2.1
Expand Down
Loading