diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e652de76..c812e7e0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ env: # credentials have been provided before trying to run steps that need them. DOCKER_USR: ${{ secrets.DOCKER_USR }} UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }} + XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }} jobs: check-diff: @@ -397,10 +398,18 @@ jobs: uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != '' with: - registry: xpkg.upbound.io + registry: xpkg.upbound.io/upbound username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }} password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }} + - name: Login to Spaces Artifacts Registry + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 + if: env.XPKG_ACCESS_ID != '' + with: + registry: xpkg.upbound.io/spaces-artifacts + username: ${{ secrets.XPKG_ACCESS_ID }} + password: ${{ secrets.XPKG_TOKEN }} + - name: Publish Artifacts to Marketplace, DockerHub run: make -j2 publish BRANCH_NAME=${GITHUB_REF##*/} @@ -453,7 +462,7 @@ jobs: - name: Setup Buf uses: bufbuild/buf-setup-action@v1 - + - name: Lint Protocol Buffers uses: bufbuild/buf-lint-action@v1 with: @@ -474,7 +483,7 @@ jobs: with: input: apis against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=${GITHUB_REF_NAME},subdir=apis" - + - name: Push Protocol Buffers to Buf Schema Registry if: ${{ github.repository == 'crossplane/crossplane' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-')) }} uses: bufbuild/buf-push-action@v1 diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 84b9f8872..025901e3c 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -27,6 +27,8 @@ env: # a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether # credentials have been provided before trying to run steps that need them. DOCKER_USR: ${{ secrets.DOCKER_USR }} + UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }} + XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }} jobs: promote-artifacts: @@ -57,10 +59,18 @@ jobs: uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != '' with: - registry: xpkg.upbound.io + registry: xpkg.upbound.io/upbound username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }} password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }} + - name: Login to Spaces Artifacts Registry + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 + if: env.XPKG_ACCESS_ID != '' + with: + registry: xpkg.upbound.io/spaces-artifacts + username: ${{ secrets.XPKG_ACCESS_ID }} + password: ${{ secrets.XPKG_TOKEN }} + - name: Promote Artifacts in DockerHub and Upbound Registry if: env.DOCKER_USR != '' && env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != '' run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/} diff --git a/Makefile b/Makefile index 6542715e3..044350f35 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ KIND_VERSION = v0.21.0 # Due to the way that the shared build logic works, images should # all be in folders at the same level (no additional levels of nesting). -REGISTRY_ORGS ?= docker.io/upbound xpkg.upbound.io/upbound +REGISTRY_ORGS ?= docker.io/upbound xpkg.upbound.io/upbound xpkg.upbound.io/spaces-artifacts IMAGES = crossplane -include build/makelib/imagelight.mk