From 19265e034ffd3ef63ee50a9089021204ea72671f Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 29 Jul 2023 11:37:40 -0700 Subject: [PATCH] Add building nightly images --- .woodpecker.yaml | 26 +++++++++++++++++++++++--- Dockerfile.nightly | 9 +++++++++ Dockerfile => Dockerfile.release | 0 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 Dockerfile.nightly rename Dockerfile => Dockerfile.release (100%) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index bab2dfc..6316daa 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -22,10 +22,29 @@ steps: - pip_token when: event: tag - publish-image: + nightly-image: image: woodpeckerci/plugin-docker-buildx + privileged: true settings: - dockerfile: Dockerfile + dockerfile: Dockerfile.nightly + registry: git.snyman.info + username: $DOCKER_USERNAME + password: $DOCKER_TOKEN + repo: git.snyman.info/${CI_REPO_OWNER}/codesmidgen + tags: + - nightly + - ${CI_COMMIT_SHA:0:8} + secrets: + - docker_username + - docker_token + when: + - branch: master + event: push + release-image: + image: woodpeckerci/plugin-docker-buildx + privileged: true + settings: + dockerfile: Dockerfile.release registry: git.snyman.info username: $DOCKER_USERNAME password: $DOCKER_TOKEN @@ -37,4 +56,5 @@ steps: - docker_username - docker_token when: - event: tag + - branch: master + event: tag diff --git a/Dockerfile.nightly b/Dockerfile.nightly new file mode 100644 index 0000000..416b32a --- /dev/null +++ b/Dockerfile.nightly @@ -0,0 +1,9 @@ +FROM python:3.11 + +WORKDIR /app +ADD . /app +RUN pip install -e . +RUN pip install hypercorn + +EXPOSE 8000 +CMD ["hypercorn", "codesmidgen.app"] diff --git a/Dockerfile b/Dockerfile.release similarity index 100% rename from Dockerfile rename to Dockerfile.release -- 2.45.2