-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (73 loc) · 2.28 KB
/
Copy pathservices.yml
File metadata and controls
81 lines (73 loc) · 2.28 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Services
on:
workflow_dispatch:
push:
branches:
- main
paths:
- services/**
- deploy/**
- .github/workflows/services.yml
pull_request:
branches:
- main
paths:
- services/**
- deploy/**
- .github/workflows/services.yml
permissions:
contents: read
jobs:
validate-manifests:
name: Validate deployment manifests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: kubeconform (strict)
run: >-
docker run --rm -v "$PWD/deploy:/deploy:ro"
ghcr.io/yannh/kubeconform:v0.7.0-alpine
-strict -summary
-schema-location default
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
-ignore-filename-pattern 'patches/.*'
/deploy
publish-images:
name: Publish service images to GHCR
runs-on: ubuntu-latest
timeout-minutes: 10
needs: validate-manifests
if: github.event_name != 'pull_request'
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Log in to GHCR
run: >-
echo "${{ secrets.GITHUB_TOKEN }}" |
docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Build and push images
run: |
for service in identity mailbox maps reports; do
image="ghcr.io/${{ github.repository_owner }}/serfbound-${service}"
docker build \
-t "${image}:latest" \
-t "${image}:${{ github.sha }}" \
"services/${service}"
docker push --all-tags "${image}"
done
- name: Summarize digests
run: |
{
echo "## Serfbound service images"
echo ""
for service in identity mailbox maps reports; do
image="ghcr.io/${{ github.repository_owner }}/serfbound-${service}"
digest="$(docker inspect --format '{{index .RepoDigests 0}}' "${image}:latest")"
echo "- \`${digest}\` (tags: latest, ${{ github.sha }})"
done
} >> "$GITHUB_STEP_SUMMARY"