Skip to content

Commit dbc8419

Browse files
authored
Merge pull request #61 from turkenf/publish-ghcr-0.4
[release-0.4] Update Go version and enable pushing to ghcr.io in CI
2 parents 4288ed9 + 3ee84ae commit dbc8419

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
env:
1616
# Common versions
17-
GO_VERSION: '1.23.1'
17+
GO_VERSION: '1.23.6'
1818
GOLANGCI_VERSION: 'v1.61.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 }}
@@ -116,9 +117,9 @@ jobs:
116117
run: ./crossplane xpkg build --package-file=${{ matrix.arch }}.xpkg --package-root=package/ --embed-runtime-image-tarball=runtime-${{ matrix.arch }}.tar
117118

118119
- name: Upload Single-Platform Package
119-
uses: actions/upload-artifact@v3
120+
uses: actions/upload-artifact@v4
120121
with:
121-
name: packages
122+
name: packages-${{ matrix.arch }}
122123
path: "*.xpkg"
123124
if-no-files-found: error
124125
retention-days: 1
@@ -135,10 +136,10 @@ jobs:
135136
uses: actions/checkout@v4
136137

137138
- name: Download Single-Platform Packages
138-
uses: actions/download-artifact@v3
139+
uses: actions/download-artifact@v4
139140
with:
140-
name: packages
141141
path: .
142+
merge-multiple: true
142143

143144
- name: Setup the Crossplane CLI
144145
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
@@ -162,3 +163,14 @@ jobs:
162163
- name: Push Multi-Platform Package to Upbound
163164
if: env.XPKG_ACCESS_ID != ''
164165
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.XPKG }}:${{ env.XPKG_VERSION }}"
166+
167+
- name: Login to GHCR
168+
uses: docker/login-action@v3.3.0
169+
with:
170+
registry: ghcr.io
171+
username: ${{ github.repository_owner }}
172+
password: ${{ secrets.GITHUB_TOKEN }}
173+
174+
- name: Push Multi-Platform Package to GHCR
175+
if: env.XPKG_ACCESS_ID != ''
176+
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/function-auto-ready
22

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

75
require (
86
github.com/alecthomas/kong v1.2.1

0 commit comments

Comments
 (0)