Skip to content

Commit 2f11fdb

Browse files
authored
Merge pull request #28 from linode/fix-ci
fix ci
2 parents c4a9d3c + 3889735 commit 2f11fdb

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,40 @@ jobs:
164164
with:
165165
flags: unittests
166166
file: _output/tests/linux_amd64/coverage.txt
167+
168+
local-deploy:
169+
runs-on: ubuntu-22.04
170+
needs: detect-noop
171+
if: needs.detect-noop.outputs.noop != 'true'
172+
173+
steps:
174+
- name: Checkout
175+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
176+
with:
177+
submodules: true
178+
179+
- name: Setup Go
180+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
181+
with:
182+
go-version: ${{ env.GO_VERSION }}
167183

184+
- name: Find the Go Build Cache
185+
id: go
186+
run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
187+
188+
- name: Cache the Go Build Cache
189+
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
190+
with:
191+
path: ${{ steps.go.outputs.cache }}
192+
key: ${{ runner.os }}-build-local-deploy-${{ hashFiles('**/go.sum') }}
193+
restore-keys: ${{ runner.os }}-build-local-deploy-
194+
195+
- name: Vendor Dependencies
196+
run: make vendor vendor.check
197+
198+
- name: Deploying locally built provider package
199+
run: make local-deploy
200+
168201
publish-artifacts:
169202
runs-on: ubuntu-22.04
170203
needs: detect-noop
@@ -181,7 +214,15 @@ jobs:
181214
with:
182215
version: ${{ env.DOCKER_BUILDX_VERSION }}
183216
install: true
184-
217+
218+
- name: Login to Upbound
219+
uses: docker/login-action@v2
220+
if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
221+
with:
222+
registry: xpkg.upbound.io
223+
username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
224+
password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
225+
185226
- name: Checkout
186227
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
187228
with:
@@ -221,3 +262,6 @@ jobs:
221262
with:
222263
name: output
223264
path: _output/**
265+
266+
- name: Publish Artifacts
267+
run: make publish BRANCH_NAME=${GITHUB_REF##*/}

0 commit comments

Comments
 (0)