-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 2.09 KB
/
docker.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
68
69
name: Create and publish a Docker image
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
alpine_version:
# bump: alpine /- ([\d.]+) # updateme/ docker:alpine|^3
# bump: alpine link "Release notes" https://alpinelinux.org/posts/Alpine-$LATEST-released.html
- 3.16.2 # updateme
- edge
include:
- alpine_version: 3.16.2
libvmaf_version: sha256:91173f8b89d81bc3ee8f0a6b0ba3ed11bdbbc3af8315fcdff7165900a893862e
- alpine_version: edge
libvmaf_version: sha256:5286265af89dc30e56017dba681b6a0d07f7dca38b5f1dcc312fc842e25cd9ea
steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@12cce9efe0d49980455aaaca9b071c0befcdd702
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-alpine_${{ matrix.alpine_version }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
build-args: |
ALPINE_VERSION=${{ matrix.alpine_version }}
LIBVMAF_VERSION=main@${{ matrix.libvmaf_version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max