From dafcd001f72e56bf0b8c7a77e4a71cc22941b44b Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 19 Jul 2023 20:00:53 +0100 Subject: [PATCH] add nginx files --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ .github/workflows/test-release.yml | 19 +++++++++++++++++++ Nginx/Dockerfile.tpl | 6 ++++++ 3 files changed, 49 insertions(+) create mode 100644 Nginx/Dockerfile.tpl diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a38f76a1d0..290074de11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,30 @@ jobs: body: | ${{steps.build_changelog.outputs.changelog}} + + + nginx-docker-image-deploy: + needs: generate-build-number + runs-on: ubuntu-latest + env: + DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}} + DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} + ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}" + steps: + - uses: actions/checkout@v3 + with: + ref: release + - uses: actions/setup-node@v2 + with: + node-version: 18.3.0 + + - run: npm run prerun + - run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 + # Build and deploy accounts. + - run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD + - run: sudo docker buildx create --use + - run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/nginx:$ONEUPTIME_VERSION --tag oneuptime/nginx:release --push -f ./Nginx/Dockerfile . + test-server-docker-image-deploy: needs: generate-build-number diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index f505ee14c8..ae9fa790e1 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -6,6 +6,25 @@ on: - "master" jobs: + nginx-test-docker-image-deploy: + needs: generate-build-number + runs-on: ubuntu-latest + env: + DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}} + DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} + ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.3.0 + + - run: npm run prerun + - run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 + # Build and deploy accounts. + - run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD + - run: sudo docker buildx create --use + - run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/nginx:$ONEUPTIME_VERSION-test --tag oneuptime/nginx:test --push -f ./Nginx/Dockerfile . generate-build-number: runs-on: ubuntu-latest diff --git a/Nginx/Dockerfile.tpl b/Nginx/Dockerfile.tpl new file mode 100644 index 0000000000..4624aa55fe --- /dev/null +++ b/Nginx/Dockerfile.tpl @@ -0,0 +1,6 @@ +FROM nginx:1.23.3-alpine + +USER root + +# Install bash. +RUN apk update && apk add bash && apk add curl \ No newline at end of file