From a44e6054aa66061e84f817c67efd21d5c4c8c581 Mon Sep 17 00:00:00 2001 From: Matthew DeVenny Date: Mon, 7 Oct 2024 11:22:49 -0700 Subject: [PATCH] Add ghcr image Signed-off-by: Matthew DeVenny --- .github/workflows/docker.yaml | 15 +++++++++++---- README.md | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 5ebf508..5649e05 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -23,14 +23,14 @@ jobs: tag="${GITHUB_REF#refs/tags/}" if [ "$branch" != "$GITHUB_REF" ]; then branch="$(echo "$branch" | sed -e 's/[^a-zA-Z0-9\-\.]/-/g')" - echo "::set-output name=TAGS::boxboat/okta-nginx:commit-${branch}" + echo "TAGS=boxboat/okta-nginx:commit-${branch},ghcr.io/boxboat/okta-nginx:commit-${branch}" >> $GITHUB_OUTPUT elif [ "$tag" != "$GITHUB_REF" ]; then latest="" if ! echo "$tag" | grep -qF '-'; then - latest=",boxboat/okta-nginx:latest" + latest=",boxboat/okta-nginx:latest,ghcr.io/boxboat/okta-nginx:latest" fi tag="$(echo "$tag" | sed -e 's/[^a-zA-Z0-9\-\.]/-/g')" - echo "::set-output name=TAGS::boxboat/okta-nginx:${tag}${latest}" + echo "TAGS=boxboat/okta-nginx:${tag},ghcr.io/boxboat/okta-nginx:${tag}${latest}" >> $GITHUB_OUTPUT else echo "unable to determine tag" >&2 exit 1 @@ -45,9 +45,16 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push id: docker_build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: true tags: "${{ steps.compute_tags.outputs.TAGS }}" diff --git a/README.md b/README.md index 16a1607..165bb52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # okta-nginx This repository builds a Docker Image that protects an upstream server using [Okta's OpenID Connect](https://developer.okta.com/docs/api/resources/oidc) `Authorization Code` flow +Images can be found at [boxboat/okta-nginx](https://hub.docker.com/r/boxboat/okta-nginx) or [ghcr.io/boxboat/okta-nginx](https://github.com/boxboat/okta-nginx/pkgs/container/okta-nginx) ## Prerequisites