From fc1d74c5ad18e20377f40a2f75c4ad4d3248d328 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 30 Jul 2024 03:09:03 -0400 Subject: [PATCH] ci: update build workflow --- .github/workflows/docker-publish.yml | 21 +++++++++++++++------ notes.Dockerfile | 24 ++++++++++++++++++++++++ Dockerfile => private.Dockerfile | 2 +- 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 notes.Dockerfile rename Dockerfile => private.Dockerfile (95%) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b33303f..06f61d8 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -17,25 +17,34 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - id: build-and-push + - name: Build and push Private Notes Docker image uses: docker/build-push-action@v4 with: context: . - file: Dockerfile + file: private.Dockerfile provenance: false push: true sbom: false tags: ghcr.io/ietf-tools/hedgedoc:latest + + - name: Build and push IETF Notes Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: notes.Dockerfile + provenance: false + push: true + sbom: false + tags: ghcr.io/ietf-tools/hedgedoc-notes:latest diff --git a/notes.Dockerfile b/notes.Dockerfile new file mode 100644 index 0000000..60218d1 --- /dev/null +++ b/notes.Dockerfile @@ -0,0 +1,24 @@ +FROM quay.io/hedgedoc/hedgedoc:1.9.9 + +ARG UID=10000 +COPY --chown=$UID /s3-upload.js /hedgedoc/lib/web/imageRouter/s3.js + +ENV CMD_ALLOW_ANONYMOUS=false +ENV CMD_ALLOW_ANONYMOUS_EDITS=true +ENV CMD_ALLOW_FREEURL=true +ENV CMD_AUTO_VERSION_CHECK=false +ENV CMD_COOKIE_POLICY=none +ENV CMD_CSP_ALLOW_FRAMING=false +ENV CMD_DEFAULT_PERMISSION=editable +ENV CMD_EMAIL=false +ENV CMD_ENABLE_STATS_API=true +ENV CMD_OAUTH2_AUTHORIZATION_URL=https://auth.ietf.org/api/openid/authorize +ENV CMD_OAUTH2_PROVIDERNAME=IETF Datatracker +ENV CMD_OAUTH2_SCOPE=openid email profile +ENV CMD_OAUTH2_TOKEN_URL=https://auth.ietf.org/api/openid/token +ENV CMD_OAUTH2_USER_PROFILE_URL=https://auth.ietf.org/api/openid/userinfo +ENV CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name +ENV CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=email +ENV CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=name +ENV CMD_PROTOCOL_USESSL=true +ENV CMD_URL_ADDPORT=false diff --git a/Dockerfile b/private.Dockerfile similarity index 95% rename from Dockerfile rename to private.Dockerfile index e50dbeb..8271c5a 100644 --- a/Dockerfile +++ b/private.Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/hedgedoc/hedgedoc:1.9.8 +FROM quay.io/hedgedoc/hedgedoc:1.9.9 ARG UID=10000 COPY --chown=$UID /oauth-index.js /hedgedoc/lib/web/auth/oauth2/index.js