Skip to content

Commit

Permalink
Merge pull request #267 from estesp/update-go
Browse files Browse the repository at this point in the history
Update to Go 1.23.2
  • Loading branch information
estesp authored Oct 2, 2024
2 parents e153b9b + a1b9757 commit 8614b6c
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:

strategy:
matrix:
go-version: [1.22.5]
go-version: [1.23.2]
os: [ubuntu-20.04, macos-12, windows-2019]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/manifest-tool

Expand All @@ -34,13 +34,13 @@ jobs:
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v6
with:
version: v1.55.2
version: v1.60.1
skip-cache: true
working-directory: src/github.com/estesp/manifest-tool/v2
args: --timeout=5m
Expand All @@ -54,15 +54,15 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/manifest-tool
fetch-depth: 100

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.22.5'
go-version: '1.23.2'

- name: Set env
shell: bash
Expand Down Expand Up @@ -105,17 +105,17 @@ jobs:
os: [ubuntu-20.04, macos-12, windows-2019]

steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.5'
go-version: '1.23.2'

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/manifest-tool

Expand All @@ -135,17 +135,17 @@ jobs:
needs: [project, linters]

steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.5'
go-version: '1.23.2'

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/manifest-tool

Expand Down Expand Up @@ -180,17 +180,17 @@ jobs:
needs: [project, linters]

steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.5'
go-version: '1.23.2'

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/manifest-tool

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22
FROM golang:1.23

RUN go install golang.org/x/tools/cmd/cover@latest \
&& go install golang.org/x/lint/golint@latest
Expand Down
2 changes: 1 addition & 1 deletion hack/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.22.5-alpine AS bld
FROM --platform=$BUILDPLATFORM golang:1.23.2-alpine AS bld
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand Down
2 changes: 1 addition & 1 deletion hack/Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.22.5-alpine AS bld
FROM --platform=$BUILDPLATFORM golang:1.23.2-alpine AS bld
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand Down
12 changes: 9 additions & 3 deletions v2/cmd/manifest-tool/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (
yaml "gopkg.in/yaml.v3"
)

const (
fmtCantResolvePath = "Can't resolve path to %q: %v"
fmtCantReadYAML = "Can't read YAML file %q: %v"
fmtCantUnmarshalYAML = "Can't unmarshal YAML file %q: %v"
)

var pushCmd = &cli.Command{
Name: "push",
Usage: "push a manifest list/OCI index entry to a registry with provided image details",
Expand All @@ -41,15 +47,15 @@ var pushCmd = &cli.Command{

filename, err := filepath.Abs(filePath)
if err != nil {
logrus.Fatalf(fmt.Sprintf("Can't resolve path to %q: %v", filePath, err))
logrus.Fatal(fmt.Sprintf(fmtCantResolvePath, filePath, err))
}
yamlFile, err := os.ReadFile(filename)
if err != nil {
logrus.Fatalf(fmt.Sprintf("Can't read YAML file %q: %v", filePath, err))
logrus.Fatal(fmt.Sprintf(fmtCantReadYAML, filePath, err))
}
err = yaml.Unmarshal(yamlFile, &yamlInput)
if err != nil {
logrus.Fatalf(fmt.Sprintf("Can't unmarshal YAML file %q: %v", filePath, err))
logrus.Fatal(fmt.Sprintf(fmtCantUnmarshalYAML, filePath, err))
}

manifestType := types.Docker
Expand Down

0 comments on commit 8614b6c

Please sign in to comment.