From 82c2b1ef573695292b06ee57031ec15a4199770f Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 23 Feb 2024 19:28:39 +0000 Subject: [PATCH 1/5] Bumping version to 6.2.0 --- VERSION | 2 +- VERSION_MINOR | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d7ff925..4ac4fde 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.1.3 \ No newline at end of file +6.2.0 \ No newline at end of file diff --git a/VERSION_MINOR b/VERSION_MINOR index e8f1734..913671c 100644 --- a/VERSION_MINOR +++ b/VERSION_MINOR @@ -1 +1 @@ -6.1 \ No newline at end of file +6.2 \ No newline at end of file From 691e898d06fdec57ac4312426f154414361b49b5 Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 23 Feb 2024 19:28:49 +0000 Subject: [PATCH 2/5] Using latest base image --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 96152d6..90492f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM bfren/nginx:nginx1.24-alpine3.19-6.1.3 +FROM bfren/nginx:nginx1.24-alpine3.19-6.2.0 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-webdav" ARG BF_IMAGE +ARG BF_PUBLISHING ARG BF_VERSION COPY ./overlay / From 520900125fb5fe0ef5c40ef56164873d29230873 Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 23 Feb 2024 19:30:47 +0000 Subject: [PATCH 3/5] Adding new test framework --- .github/workflows/dev.yml | 33 +++++++++++++++++++++++++++------ .github/workflows/publish.yml | 11 +++++++++++ test.sh | 15 +++++++++++++++ 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 test.sh diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 3ab86e1..a6cbbd9 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -6,13 +6,10 @@ on: tags-ignore: ['**'] workflow_dispatch: +env: + TEST_TAG: nginx-webdav:test + jobs: - test: - runs-on: ubuntu-latest - steps: - - - name: Checkout code - uses: actions/checkout@v4 build: runs-on: ubuntu-latest steps: @@ -41,6 +38,28 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and export + id: docker_export + uses: docker/build-push-action@v5 + with: + build-args: | + BF_IMAGE=${{ env.REPOSITORY_NAME }} + BF_VERSION=${{ steps.version.outputs.contents }} + load: true + tags: ${{ env.TEST_TAG }} + - + name: Run tests + id: docker_test + run: | + docker run --entrypoint "/usr/bin/env" ${{ env.TEST_TAG }} -i nu -c "use bf test ; test" - name: Build and push id: docker_build @@ -54,6 +73,8 @@ jobs: tags: | bfren/nginx-webdav:dev bfren/nginx-webdav:${{ steps.version.outputs.contents }}-dev + ghcr.io/bfren/nginx-webdav:dev + ghcr.io/bfren/nginx-webdav:${{ steps.version.outputs.contents }}-dev - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f7d964f..42a9b18 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,6 +46,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push id: docker_build @@ -61,6 +68,10 @@ jobs: bfren/nginx-webdav:${{ steps.version_major.outputs.contents }} bfren/nginx-webdav:${{ steps.version_minor.outputs.contents }} bfren/nginx-webdav:${{ steps.version.outputs.contents }} + ghcr.io/bfren/nginx-webdav:latest + ghcr.io/bfren/nginx-webdav:${{ steps.version_major.outputs.contents }} + ghcr.io/bfren/nginx-webdav:${{ steps.version_minor.outputs.contents }} + ghcr.io/bfren/nginx-webdav:${{ steps.version.outputs.contents }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..0d590a5 --- /dev/null +++ b/test.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +IMAGE=nginx-webdav +VERSION=`cat VERSION` +TAG=${IMAGE}-test + +docker buildx build \ + --load \ + --build-arg BF_IMAGE=${IMAGE} \ + --build-arg BF_VERSION=${VERSION} \ + -f Dockerfile \ + -t ${TAG} \ + . \ + && \ + docker run --entrypoint "/usr/bin/env" ${TAG} -i nu -c "use bf test ; test" From 41ff51564fdf92178d9248d7d440067ea746cca7 Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 23 Feb 2024 19:31:13 +0000 Subject: [PATCH 4/5] Using latest Nginx build --- overlay/tmp/NGINX_BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/tmp/NGINX_BUILD b/overlay/tmp/NGINX_BUILD index b783f77..60c2e6f 100644 --- a/overlay/tmp/NGINX_BUILD +++ b/overlay/tmp/NGINX_BUILD @@ -1 +1 @@ -1.24.0-r14 \ No newline at end of file +1.24.0-r15 \ No newline at end of file From e4b05ef5c18b239bf8404ac4742f66546b64430b Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 23 Feb 2024 19:31:52 +0000 Subject: [PATCH 5/5] Adding tests mod.nu --- overlay/etc/nu/scripts/tests/mod.nu | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 overlay/etc/nu/scripts/tests/mod.nu diff --git a/overlay/etc/nu/scripts/tests/mod.nu b/overlay/etc/nu/scripts/tests/mod.nu new file mode 100644 index 0000000..e69de29