Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker Push for quay.io #22

Merged
merged 6 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading