diff --git a/.Dockerignore b/.Dockerignore new file mode 100644 index 0000000..9b7c019 --- /dev/null +++ b/.Dockerignore @@ -0,0 +1,4 @@ +.DS_Store +README.md +.gitignore +.github \ No newline at end of file diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml new file mode 100644 index 0000000..9fa00b9 --- /dev/null +++ b/.github/workflows/container.yml @@ -0,0 +1,35 @@ +name: Create data container + +on: + push: + branches: + - main + +env: + REGISTRY: ghcr.io + +jobs: + frontend-container: + name: Create template container + runs-on: ubuntu-latest + steps: + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/templates + tags: type=ref,event=branch + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9e7d194 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +# Minimal data container for the templates. +# This is used to copy the templates into the webapp containers. +FROM scratch + +COPY . .