diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff83c87..e76aa23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,7 +164,40 @@ jobs: with: flags: unittests file: _output/tests/linux_amd64/coverage.txt + + local-deploy: + runs-on: ubuntu-22.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' + + steps: + - name: Checkout + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + with: + submodules: true + + - name: Setup Go + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3 + with: + go-version: ${{ env.GO_VERSION }} + - name: Find the Go Build Cache + id: go + run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + + - name: Cache the Go Build Cache + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 + with: + path: ${{ steps.go.outputs.cache }} + key: ${{ runner.os }}-build-local-deploy-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-build-local-deploy- + + - name: Vendor Dependencies + run: make vendor vendor.check + + - name: Deploying locally built provider package + run: make local-deploy + publish-artifacts: runs-on: ubuntu-22.04 needs: detect-noop @@ -181,7 +214,15 @@ jobs: with: 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: Checkout uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 with: @@ -221,3 +262,6 @@ jobs: with: name: output path: _output/** + + - name: Publish Artifacts + run: make publish BRANCH_NAME=${GITHUB_REF##*/}