Skip to content

Commit

Permalink
add dockerfiles, setup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
roschaefer committed Oct 24, 2024
1 parent 05b04ed commit edd77cb
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 324 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/deploy.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: publish

on: push

jobs:
build-and-push-images:
strategy:
matrix:
app:
- name: backend
file: backend.Dockerfile
- name: webapp
file: webapp.Dockerfile
- name: maintenance
file: maintenance.Dockerfile
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/${{ matrix.app.name }}
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.1.7
- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push Docker images
id: push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
file: ${{ matrix.app.file }}
push: true
build-args:
APP_IMAGE_TAG_CODE: ${{ github.head_ref || github.ref_name }}-code
APP_IMAGE_TAG_BASE: ${{ github.head_ref || github.ref_name }}-base
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
267 changes: 0 additions & 267 deletions .github/workflows/publish.yml

This file was deleted.

Loading

0 comments on commit edd77cb

Please sign in to comment.