Skip to content

Commit

Permalink
Merge pull request #1 from tampakrap/up_login
Browse files Browse the repository at this point in the history
chore: Create Make task to login to the Upbound Marketplace via up login
  • Loading branch information
tampakrap authored Mar 30, 2024
2 parents dc84520 + 11909fe commit 7c8dd67
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
# step 'if env.XXX != ""', so we copy these to succinctly test whether
# credentials have been provided before trying to run steps that need them.
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }}

jobs:
detect-noop:
Expand Down Expand Up @@ -256,13 +257,13 @@ jobs:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Login to Upbound
uses: docker/login-action@v2
if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
with:
registry: xpkg.upbound.io
username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
#- name: Login to Upbound
# uses: docker/login-action@v2
# if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
# with:
# registry: xpkg.upbound.io
# username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
# password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}

- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3
Expand Down Expand Up @@ -311,5 +312,9 @@ jobs:
name: output
path: _output/**

- name: Login to Upbound via up login
if: env.XPKG_ACCESS_ID != ''
run: make up.login TOKEN=${{ secrets.XPKG_TOKEN }}

- name: Publish Artifacts
run: make publish BRANCH_NAME=${GITHUB_REF##*/}
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ run: go.build
@# To see other arguments that can be provided, run the command with --help instead
UPBOUND_CONTEXT="local" $(GO_OUT_DIR)/provider --debug

# Login to the Upbound Marketplace via up login
up.login:
@$(UP) login -q -t $(TOKEN)

# ====================================================================================
# End to End Testing
CROSSPLANE_NAMESPACE = upbound-system
Expand Down

0 comments on commit 7c8dd67

Please sign in to comment.