Skip to content

Commit

Permalink
fix publish artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
niuzhenguo committed May 24, 2024
1 parent 417a4a2 commit 93a9f69
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ env:
GO_VERSION: '1.19'
GOLANGCI_VERSION: 'v1.50.0'
DOCKER_BUILDX_VERSION: 'v0.8.2'

# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
# 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 @@ -263,12 +259,12 @@ jobs:
install: true

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

- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3
Expand Down Expand Up @@ -312,10 +308,14 @@ jobs:
BUILD_ARGS: "--load"

- name: Upload Artifacts to GitHub
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: output
path: _output/**

- name: Publish Artifacts
run: make publish BRANCH_NAME=${GITHUB_REF##*/}
if: env.XPKG_ACCESS_ID != ''
env:
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.XPKG_ACCESS_ID }}
UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW: ${{ secrets.XPKG_TOKEN }}

0 comments on commit 93a9f69

Please sign in to comment.