Skip to content

Commit c60c5ad

Browse files
committed
add dockerfiles, setup workflows
1 parent 05b04ed commit c60c5ad

File tree

6 files changed

+196
-324
lines changed

6 files changed

+196
-324
lines changed

.github/workflows/deploy.yml

-57
This file was deleted.

.github/workflows/docker-push.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: publish
2+
3+
on: push
4+
5+
jobs:
6+
build-and-push-images:
7+
strategy:
8+
matrix:
9+
app:
10+
- name: backend
11+
file: backend.Dockerfile
12+
- name: webapp
13+
file: webapp.Dockerfile
14+
- name: maintenance
15+
file: maintenance.Dockerfile
16+
runs-on: ubuntu-latest
17+
env:
18+
REGISTRY: ghcr.io
19+
IMAGE_NAME: ${{ github.repository }}/${{ matrix.app.name }}
20+
permissions:
21+
contents: read
22+
packages: write
23+
attestations: write
24+
id-token: write
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.1.7
29+
- name: Log in to the Container registry
30+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Extract metadata (tags, labels) for Docker
36+
id: meta
37+
uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166
38+
with:
39+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
tags: |
41+
type=schedule
42+
type=semver,pattern={{version}}
43+
type=semver,pattern={{major}}.{{minor}}
44+
type=semver,pattern={{major}}
45+
type=ref,event=branch
46+
type=ref,event=pr
47+
type=sha
48+
- name: Build and push Docker images
49+
id: push
50+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
51+
with:
52+
file: ${{ matrix.app.file }}
53+
push: true
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/publish.yml

-267
This file was deleted.

0 commit comments

Comments
 (0)