-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.35 KB
/
cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Continuous Deployment
on:
push:
branches:
- main
permissions:
contents: read
packages: write
jobs:
cd:
name: Build Container Image
runs-on: ubuntu-latest
strategy:
matrix:
service: [ bar, foo ]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.0
id: meta
with:
images: |
ghcr.io/${{ github.actor }}/monorepo-${{ matrix.service }}
tags: |
type=sha,enable=true,format=long,priority=200
type=raw,enable=true,value=latest,priority=100
flavor: |
suffix=-monorepo
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1
with:
context: .
file: ${{ matrix.service }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}