Skip to content

Commit

Permalink
Merge branch 'main' into multi-coupon
Browse files Browse the repository at this point in the history
  • Loading branch information
kenafoster committed Oct 25, 2024
2 parents 761430c + fdb77c3 commit 69cd10d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/publish-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- self-registration/**

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: quay.io
IMAGE_NAME: nebari/nebari-self-registration

jobs:
push:
Expand All @@ -20,18 +20,23 @@ jobs:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Set lower case image name
- name: "Checkout Repository 🛎️"
uses: actions/checkout@v3
- name: "Login to Quay Container Registry 🔐"
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: "Set lower case image name"
run: echo "IMAGE_LC=${IMAGE_NAME,,}" >>${GITHUB_ENV}
- name: Set the timestamp for version
- name: "Set the timestamp for version"
run: echo "VERSION=$(date +'%Y%m%d-%H%M')" >> ${GITHUB_ENV}
- name: Build image
- name: "Build image"
run: docker build self-registration --file self-registration/Dockerfile --tag $IMAGE_LC --label "runnumber=${GITHUB_RUN_ID}"
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login $REGISTRY -u $ --password-stdin
- name: Push image
run: |
IMAGE_ID=ghcr.io/$IMAGE_LC
IMAGE_ID=$REGISTRY/$IMAGE_LC
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
Expand Down
6 changes: 3 additions & 3 deletions self-registration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM python:3.12
FROM python:3.12@sha256:05855f5bf06f5a004b0c1a8aaac73a9d9ea54390fc289d3e80ef52c4f90d5585

WORKDIR /app

COPY ./requirements.txt /tmp/requirements.txt

# need to pre-install cython < 3 to avoid pyyaml >= 5.4.1 incompatibility https://github.com/yaml/pyyaml/issues/601
# need to pre-install cython < 3 to avoid pyyaml >= 5.4.1 incompatibility: https://github.com/yaml/pyyaml/issues/601
RUN echo "cython<3" > /tmp/constraint.txt

RUN PIP_CONSTRAINT=/tmp/constraint.txt pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
Expand All @@ -15,4 +15,4 @@ COPY ./app /app
RUN useradd -m www
USER www

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
1 change: 1 addition & 0 deletions self-registration/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fastapi==0.104.1
uvicorn==0.24.0.post1
jinja2==3.1.2
setuptools==69.0.3
python-keycloak==3.3.0
pyyaml==5.4.1
python-multipart==0.0.6
Expand Down
2 changes: 1 addition & 1 deletion src/nebari_plugin_self_registration/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.12"
__version__ = "0.0.14"
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ version: 0.0.16
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.12"
appVersion: "0.0.14"
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

replicaCount: 1
image:
repository: ghcr.io/metrostar/nebari-self-registration
repository: quay.io/nebari/nebari-self-registration
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "20240515-1204"
tag: "20241023-1753"

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit 69cd10d

Please sign in to comment.