-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (72 loc) · 2.04 KB
/
docker-hwaccel.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
70
71
72
73
74
75
name: docker-hawccel-build
on:
workflow_call:
inputs:
upstream:
required: true
type: string
tag1:
required: true
type: string
tag2:
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: true
DOCKERHUB_PASSWORD:
required: true
GITHUB_TOKEN:
required: true
env:
IMAGE_NAME: stash-s6
permissions:
packages: write
contents: read
jobs:
docker-hwaccel-build:
strategy:
matrix:
upstream: [ ${{ secrets.upstream }} ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Git commit timestamps
run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64
- uses: docker/setup-buildx-action@v3
- id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
secrets.tag1
secrets.tag2
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: build and push multi-arch hwaccel image
uses: docker/build-push-action@v5
with:
push: true
provenance: false
file: dockerfile/hwaccel.Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
STASH_TAG=${{ matrix.upstream }}
BUILD_DATE=${{ env.TIMESTAMP }}
env:
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}