Skip to content

Commit eb45288

Browse files
authored
Merge pull request #171 from turkenf/publish-ghcr
Update Go version and enable pushing to ghcr.io in CI
2 parents 2924b4c + 6460c82 commit eb45288

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
env:
1616
# Common versions
17-
GO_VERSION: '1.23.3'
17+
GO_VERSION: '1.23.6'
1818
GOLANGCI_VERSION: 'v1.62.0'
1919
DOCKER_BUILDX_VERSION: 'v0.11.2'
2020

@@ -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 }}
@@ -165,3 +166,14 @@ jobs:
165166
- name: Push Multi-Platform Package to Upbound
166167
if: env.XPKG_ACCESS_ID != ''
167168
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.XPKG }}:${{ env.XPKG_VERSION }}"
169+
170+
- name: Login to GHCR
171+
uses: docker/[email protected]
172+
with:
173+
registry: ghcr.io
174+
username: ${{ github.repository_owner }}
175+
password: ${{ secrets.GITHUB_TOKEN }}
176+
177+
- name: Push Multi-Platform Package to GHCR
178+
if: env.XPKG_ACCESS_ID != ''
179+
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.CROSSPLANE_REGORG }}:${{ env.XPKG_VERSION }}"

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/crossplane-contrib/function-go-templating
22

3-
go 1.23
4-
5-
toolchain go1.23.3
3+
go 1.23.6
64

75
require (
86
dario.cat/mergo v1.0.1

0 commit comments

Comments
 (0)