Skip to content

Commit eb3fe33

Browse files
committed
Push to GHCR, hopefully
Signed-off-by: Nic Cope <[email protected]>
1 parent 830dd91 commit eb3fe33

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,12 @@ env:
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.
28+
XPKG: xpkg.crossplane.io/${{ github.repository}}
3429

3530
# The package version to push. The default is 0.0.0-gitsha.
3631
XPKG_VERSION: ${{ inputs.version }}
@@ -127,8 +122,7 @@ jobs:
127122
retention-days: 1
128123

129124
# 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.
125+
# pushes them as a multi-platform package.
132126
push:
133127
runs-on: ubuntu-24.04
134128
needs:
@@ -148,13 +142,12 @@ jobs:
148142
- name: Setup the Crossplane CLI
149143
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
150144

151-
- name: Login to Upbound
145+
- name: Login to GitHub Container Registry
152146
uses: docker/login-action@v3
153-
if: env.XPKG_ACCESS_ID != ''
154147
with:
155-
registry: xpkg.upbound.io
156-
username: ${{ secrets.XPKG_ACCESS_ID }}
157-
password: ${{ secrets.XPKG_TOKEN }}
148+
registry: ghcr.io
149+
username: ${{ github.actor }}
150+
password: ${{ secrets.GITHUB_TOKEN }}
158151

159152
# If a version wasn't explicitly passed as a workflow_dispatch input we
160153
# default to version v0.0.0-<git-commit-date>-<git-short-sha>, for example
@@ -164,8 +157,7 @@ jobs:
164157
if: env.XPKG_VERSION == ''
165158
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
166159

167-
- name: Push Multi-Platform Package to Upbound
168-
if: env.XPKG_ACCESS_ID != ''
160+
- name: Push Multi-Platform Package to GitHub Container Registry
169161
# XPKG repo name can't contain uppercase characters like UpboundCare, we need to lowercase if the GithubOrg contains them.
170162
# See https://github.com/orgs/community/discussions/25768#discussioncomment-8057564 for XPKG@L lowercase explanation
171163
run: "./crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${XPKG@L}:${{ env.XPKG_VERSION }}"

0 commit comments

Comments
 (0)