Skip to content

Commit 624c1d2

Browse files
authored
Merge pull request #57 from bobh66/update_workflow
Update CI workflow and renovate
2 parents d703d8f + dfacc94 commit 624c1d2

File tree

4 files changed

+35
-225
lines changed

4 files changed

+35
-225
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ on:
1414

1515
env:
1616
# Common versions
17-
GO_VERSION: '1.21.3'
18-
GOLANGCI_VERSION: 'v1.54.2'
19-
DOCKER_BUILDX_VERSION: 'v0.11.2'
17+
GO_VERSION: '1.23.8'
18+
GOLANGCI_VERSION: 'v1.62.0'
19+
DOCKER_BUILDX_VERSION: 'v0.23.0'
2020

2121
# These environment variables are important to the Crossplane CLI install.sh
2222
# script. They determine what version it installs.
@@ -31,6 +31,7 @@ env:
3131
# The package to push, without a version tag. The default matches GitHub. For
3232
# example xpkg.upbound.io/crossplane/function-template-go.
3333
XPKG: xpkg.upbound.io/${{ github.repository}}
34+
CROSSPLANE_REGORG: ghcr.io/${{ github.repository}} # xpkg.crossplane.io/crossplane-contrib
3435

3536
# The package version to push. The default is 0.0.0-gitsha.
3637
XPKG_VERSION: ${{ inputs.version }}
@@ -40,14 +41,17 @@ jobs:
4041
runs-on: ubuntu-24.04
4142
steps:
4243
- name: Checkout
43-
uses: actions/checkout@v4
44+
uses: actions/checkout@v5
4445

4546
- name: Setup Go
4647
uses: actions/setup-go@v5
4748
with:
4849
go-version: ${{ env.GO_VERSION }}
4950
cache: false # The golangci-lint action does its own caching.
5051

52+
- name: Check go mod tidy
53+
run: go mod tidy && git diff --exit-code go.mod go.sum
54+
5155
- name: Lint
5256
uses: golangci/golangci-lint-action@v6
5357
with:
@@ -57,7 +61,7 @@ jobs:
5761
runs-on: ubuntu-24.04
5862
steps:
5963
- name: Checkout
60-
uses: actions/checkout@v4
64+
uses: actions/checkout@v5
6165

6266
- name: Setup Go
6367
uses: actions/setup-go@v5
@@ -70,7 +74,7 @@ jobs:
7074
# We want to build most packages for the amd64 and arm64 architectures. To
7175
# speed this up we build single-platform packages in parallel. We then upload
7276
# those packages to GitHub as a build artifact. The push job downloads those
73-
# artifacts and pushes them as a single multi-platform package.
77+
# artifacts and pushes them as a single multi-platform package.
7478
build:
7579
runs-on: ubuntu-24.04
7680
strategy:
@@ -92,7 +96,7 @@ jobs:
9296
install: true
9397

9498
- name: Checkout
95-
uses: actions/checkout@v4
99+
uses: actions/checkout@v5
96100

97101
# We ask Docker to use GitHub Action's native caching support to speed up
98102
# the build, per https://docs.docker.com/build/cache/backends/gha/.
@@ -108,13 +112,13 @@ jobs:
108112
build-args:
109113
GO_VERSION=${{ env.GO_VERSION }}
110114
outputs: type=docker,dest=runtime-${{ matrix.arch }}.tar
111-
115+
112116
- name: Setup the Crossplane CLI
113117
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
114118

115119
- name: Build Package
116120
run: ./crossplane xpkg build --package-file=${{ matrix.arch }}.xpkg --package-root=package/ --embed-runtime-image-tarball=runtime-${{ matrix.arch }}.tar
117-
121+
118122
- name: Upload Single-Platform Package
119123
uses: actions/upload-artifact@v4
120124
with:
@@ -132,13 +136,14 @@ jobs:
132136
- build
133137
steps:
134138
- name: Checkout
135-
uses: actions/checkout@v4
139+
uses: actions/checkout@v5
136140

137141
- name: Download Single-Platform Packages
138-
uses: actions/download-artifact@v4
142+
uses: actions/download-artifact@v5
139143
with:
140144
path: .
141145
merge-multiple: true
146+
pattern: "!*.dockerbuild" # This gets uploaded by docker/build-push-action but must be skipped: https://github.com/actions/toolkit/pull/1874
142147

143148
- name: Setup the Crossplane CLI
144149
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
@@ -162,3 +167,14 @@ jobs:
162167
- name: Push Multi-Platform Package to Upbound
163168
if: env.XPKG_ACCESS_ID != ''
164169
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.XPKG }}:${{ env.XPKG_VERSION }}"
170+
171+
- name: Login to GHCR
172+
uses: docker/[email protected]
173+
with:
174+
registry: ghcr.io
175+
username: ${{ github.repository_owner }}
176+
password: ${{ secrets.GITHUB_TOKEN }}
177+
178+
- name: Push Multi-Platform Package to GHCR
179+
if: env.XPKG_ACCESS_ID != ''
180+
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.CROSSPLANE_REGORG }}:${{ env.XPKG_VERSION }}"

.golangci.yml

Lines changed: 0 additions & 208 deletions
This file was deleted.

go.sum

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
4242
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
4343
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
4444
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
45-
github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0=
46-
github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA=
47-
github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY=
48-
github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
45+
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
46+
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
4947
github.com/alecthomas/kong v0.9.0 h1:G5diXxc85KvoV2f0ZRVuMsi45IrBgx9zDNGNj165aPA=
5048
github.com/alecthomas/kong v0.9.0/go.mod h1:Y47y5gKfHp1hDc7CH7OeXgLIpp+Q2m1Ni0L5s3bI8Os=
51-
github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
52-
github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
49+
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
50+
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
5351
github.com/antchfx/htmlquery v1.2.4 h1:qLteofCMe/KGovBI6SQgmou2QNyedFUW+pE+BpeZ494=
5452
github.com/antchfx/htmlquery v1.2.4/go.mod h1:2xO6iu3EVWs7R2JYqBbp8YzG50gj/ofqs5/0VZoDZLc=
5553
github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8=

renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@
1212
"matchFileNames": ["example/**"],
1313
"groupName": "examples"
1414
}
15+
],
16+
"postUpdateOptions": [
17+
"gomodTidy",
18+
"gomodUpdateImportPaths"
1519
]
1620
}

0 commit comments

Comments
 (0)