Skip to content

Commit

Permalink
DBP-190 Initial commit with Dockerfile and Github actions (#1)
Browse files Browse the repository at this point in the history
* DBP-190 Initial commit with Dockerfile and Github actions

* DBP-190 Added additional number to version number

* DBP-190 Added permissions to etherpad to ghcr workflow

* DBP-190 Removed leftover Moodle
  • Loading branch information
simoncolincap authored Jul 7, 2023
1 parent 3dc61d1 commit 5d0bc51
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-and-push-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Build and push Docker Image on Tag

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9].[0-9]+'
jobs:
pre_build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
suffix: ${{ steps.tag.outputs.suffix }}
steps:
- name: Filter Tag name
uses: olegtarasov/[email protected]
id: tag
with:
tagRegex: "(?<tag>[0-9]+.[0-9]+.[0-9]+.[0-9]+)"
build_and_push:
needs: pre_build
uses: hpi-schul-cloud/infra-tools/.github/workflows/build-and-push.yaml@master
with:
registry: ghcr.io
image: dbildungsplattform/etherpad
tag: ${{ needs.pre_build.outputs.tag }}
18 changes: 18 additions & 0 deletions .github/workflows/etherpad-to-ghcr-on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Etherpad Docker Image on Push to GHCR

on:
push:
branches-ignore:
- master

jobs:
build_image_on_push:
permissions:
actions: read
contents: read
packages: write
security-events: write
uses: hpi-schul-cloud/infra-tools/.github/workflows/imagetoghcr-on-push.yaml@master
with:
image_name: "etherpad"
16 changes: 16 additions & 0 deletions .github/workflows/trivy-cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Docker Image Trivy Image Vulnerability Scan Cron Job
on:
schedule:

- cron: '0 2 * * *'
permissions:
# security-events required for all workflows; action, contents only required for workflows in private repositories
security-events: write
actions: read
contents: read
jobs:
trivy_image_scan_cron:
uses: hpi-schul-cloud/infra-tools/.github/workflows/trivy-scan.yaml@master
with:
image-ref: 'ghcr.io/dbildungsplattform/etherpad:latest'
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM etherpad/etherpad:1.8.18
RUN npm install --no-save --legacy-peer-deps ep_mathjax

0 comments on commit 5d0bc51

Please sign in to comment.