Skip to content

Commit 1e53790

Browse files
authored
Merge pull request #126 from negz/cee-eye
Fix CI builds, and push to `xpkg.crossplane.io` instead of `xpkg.upbound.io`
2 parents c227474 + 66d89b6 commit 1e53790

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,18 @@ env:
1616
# Common versions
1717
PYTHON_VERSION: '3.11'
1818
HATCH_VERSION: '1.12.0'
19-
DOCKER_BUILDX_VERSION: 'v0.11.2'
19+
DOCKER_BUILDX_VERSION: 'v0.24.0'
2020

2121
# These environment variables are important to the Crossplane CLI install.sh
2222
# script. They determine what version it installs.
23-
XP_CHANNEL: master # TODO(negz): Pin to stable once v1.14 is released.
24-
XP_VERSION: current # TODO(negz): Pin to a version once v1.14 is released.
25-
26-
# This CI job will automatically push new builds to xpkg.upbound.io if the
27-
# XPKG_ACCESS_ID and XPKG_TOKEN secrets are set in the GitHub respository (or
28-
# organization) settings. Create a token at https://accounts.upbound.io.
29-
XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }}
23+
XP_CHANNEL: stable
24+
XP_VERSION: v1.20.0
3025

3126
# The package to push, without a version tag. The default matches GitHub. For
32-
# example xpkg.upbound.io/crossplane/function-template-go.
33-
XPKG: xpkg.upbound.io/${{ github.repository}}
27+
# example xpkg.crossplane.io/crossplane/function-template-go. Note that
28+
# xpkg.crossplane.io is just an alias for ghcr.io, so we upload to ghcr.io but
29+
# this'll be pulled from xpkg.crossplane.io.
30+
XPKG: ghcr.io/${{ github.repository}}
3431

3532
# The package version to push. The default is 0.0.0-gitsha.
3633
XPKG_VERSION: ${{ inputs.version }}
@@ -127,8 +124,7 @@ jobs:
127124
retention-days: 1
128125

129126
# This job downloads the single-platform packages built by the build job, and
130-
# pushes them as a multi-platform package. We only push the package it the
131-
# XPKG_ACCESS_ID and XPKG_TOKEN secrets were provided.
127+
# pushes them as a multi-platform package.
132128
push:
133129
runs-on: ubuntu-24.04
134130
needs:
@@ -140,19 +136,20 @@ jobs:
140136
- name: Download Single-Platform Packages
141137
uses: actions/download-artifact@v4
142138
with:
139+
# See https://github.com/docker/build-push-action/blob/263435/README.md#summaries
140+
pattern: "!*.dockerbuild"
143141
path: .
144142
merge-multiple: true
145143

146144
- name: Setup the Crossplane CLI
147145
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
148146

149-
- name: Login to Upbound
147+
- name: Login to GitHub Container Registry
150148
uses: docker/login-action@v3
151-
if: env.XPKG_ACCESS_ID != ''
152149
with:
153150
registry: xpkg.upbound.io
154-
username: ${{ secrets.XPKG_ACCESS_ID }}
155-
password: ${{ secrets.XPKG_TOKEN }}
151+
username: ${{ github.repository_owner }}
152+
password: ${{ secrets.GITHUB_TOKEN }}
156153

157154
# If a version wasn't explicitly passed as a workflow_dispatch input we
158155
# default to version v0.0.0-<git-commit-date>-<git-short-sha>, for example
@@ -162,6 +159,5 @@ jobs:
162159
if: env.XPKG_VERSION == ''
163160
run: echo "XPKG_VERSION=v0.0.0-$(date -d@$(git show -s --format=%ct) +%Y%m%d%H%M%S)-$(git rev-parse --short=12 HEAD)" >> $GITHUB_ENV
164161

165-
- name: Push Multi-Platform Package to Upbound
166-
if: env.XPKG_ACCESS_ID != ''
162+
- name: Push Multi-Platform Package to GitHub Container Registry
167163
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.XPKG }}:${{ env.XPKG_VERSION }}"

0 commit comments

Comments
 (0)