Skip to content

Commit

Permalink
Add ghcr image
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew DeVenny <[email protected]>
  • Loading branch information
matthewdevenny committed Oct 7, 2024
1 parent 682104c commit 770398d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 770398d

Please sign in to comment.