Skip to content

Commit

Permalink
ghcr.io/ and auth
Browse files Browse the repository at this point in the history
  • Loading branch information
drewwells committed Aug 23, 2023
1 parent d456153 commit 559b45a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: PR
on: pull_request
jobs:
buildapiserver:
name: Build API Server
build-and-push-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
timeout-minutes: 12
defaults:
run:
shell: bash -ex -o pipefail {0}
env:
REGISTRY: ghcr.io/
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -22,6 +26,12 @@ jobs:
go-version: 1.21.x
cache-dependency-path: test/contact/go.sum
go-version-file: 'test/contact/go.mod'
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Extension APIServer
timeout-minutes: 10
run: |
Expand Down Expand Up @@ -55,6 +65,7 @@ jobs:
shell: bash -ex -o pipefail {0}
working-directory: ./src/github.com/${{ github.repository }}
env:
REGISTRY: ghcr.io/
GOPATH: ${{ github.workspace }}
KONK_NAMESPACE: baz
steps:
Expand Down Expand Up @@ -129,6 +140,12 @@ jobs:
done
make test-konk KONK_NAMESPACE=$KONK_NAMESPACE
make test-konk-local
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Extension APIServer
timeout-minutes: 4
run: |
Expand Down
2 changes: 1 addition & 1 deletion test/apiserver/makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IMAGE_TAG ?= $(shell git describe --tags --always)
IMAGE_REPO ?= infoblox/konk-apiserver-example
IMAGE_REPO ?= ${REGISTRY}infoblox/konk-apiserver-example
IMAGE := $(IMAGE_REPO):$(IMAGE_TAG)
TEST_ENV := GO111MODULE=off
BUILD_FLAGS ?=
Expand Down

0 comments on commit 559b45a

Please sign in to comment.