Skip to content

Commit 559b45a

Browse files
author
Drew Wells
committed
ghcr.io/ and auth
1 parent d456153 commit 559b45a

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.github/workflows/pr.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
name: PR
22
on: pull_request
33
jobs:
4-
buildapiserver:
5-
name: Build API Server
4+
build-and-push-image:
65
runs-on: ubuntu-latest
76
strategy:
87
fail-fast: false
98
timeout-minutes: 12
109
defaults:
1110
run:
1211
shell: bash -ex -o pipefail {0}
12+
env:
13+
REGISTRY: ghcr.io/
14+
permissions:
15+
contents: read
16+
packages: write
1317
steps:
1418
- name: Checkout code
1519
uses: actions/checkout@v3
@@ -22,6 +26,12 @@ jobs:
2226
go-version: 1.21.x
2327
cache-dependency-path: test/contact/go.sum
2428
go-version-file: 'test/contact/go.mod'
29+
- name: Log in to the Container registry
30+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
2535
- name: Build Extension APIServer
2636
timeout-minutes: 10
2737
run: |
@@ -55,6 +65,7 @@ jobs:
5565
shell: bash -ex -o pipefail {0}
5666
working-directory: ./src/github.com/${{ github.repository }}
5767
env:
68+
REGISTRY: ghcr.io/
5869
GOPATH: ${{ github.workspace }}
5970
KONK_NAMESPACE: baz
6071
steps:
@@ -129,6 +140,12 @@ jobs:
129140
done
130141
make test-konk KONK_NAMESPACE=$KONK_NAMESPACE
131142
make test-konk-local
143+
- name: Log in to the Container registry
144+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
145+
with:
146+
registry: ${{ env.REGISTRY }}
147+
username: ${{ github.actor }}
148+
password: ${{ secrets.GITHUB_TOKEN }}
132149
- name: Deploy Extension APIServer
133150
timeout-minutes: 4
134151
run: |

test/apiserver/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
IMAGE_TAG ?= $(shell git describe --tags --always)
2-
IMAGE_REPO ?= infoblox/konk-apiserver-example
2+
IMAGE_REPO ?= ${REGISTRY}infoblox/konk-apiserver-example
33
IMAGE := $(IMAGE_REPO):$(IMAGE_TAG)
44
TEST_ENV := GO111MODULE=off
55
BUILD_FLAGS ?=

0 commit comments

Comments
 (0)