Skip to content

Commit

Permalink
ci: update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel authored Jul 30, 2024
1 parent 3c6811b commit fc1d74c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 24 additions & 0 deletions notes.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Dockerfile → private.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit fc1d74c

Please sign in to comment.