-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (57 loc) · 1.8 KB
/
container-images.yml
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
name: container-images
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-push-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
image:
- function-mmsys-test-encode
- function-noop
- function-sleep
- gateway-nbmp
- workflow-manager
- workflow-manager-helper
- workflow-opentelemetry-adapter
- workflow-vacuum
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
if: ${{ github.event_name == 'push' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: set up Docker buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x
# FIXME: disable provenance due to https://github.com/snok/container-retention-policy/issues/63
- name: build and push container images
run: |
case "${{ github.event_name }}" in
push) BUILDX_OUTPUT='--push' ;;
*) BUILDX_OUTPUT='' ;;
esac
make image-${{ matrix.image }} \
IMAGE_PLATFORMS=linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x \
BUILDX_OUTPUT="${BUILDX_OUTPUT} --provenance=false"
- name: delete untagged container images
uses: snok/container-retention-policy@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
account-type: org
org-name: nagare-media
image-names: engine/${{ matrix.image }}
untagged-only: true
cut-off: 1 second ago UTC