Skip to content

Commit

Permalink
Merge pull request #22 from nebari-dev/gh-action_quay-update
Browse files Browse the repository at this point in the history
Update Docker Push for quay.io
  • Loading branch information
aktech authored Sep 26, 2024
2 parents fc44b3e + abbb1c7 commit 98be35a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 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
4 changes: 2 additions & 2 deletions self-registration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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"]
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.13"
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.13"
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: "20240926-1841"

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit 98be35a

Please sign in to comment.