-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
73 lines (71 loc) · 2.09 KB
/
build-ffmpeg.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
name: Build and Deploy FFmpeg
on:
push:
branches:
- trunk
paths:
- '.ffmpeg/Dockerfile'
pull_request:
paths:
- '.ffmpeg/Dockerfile'
workflow_dispatch:
inputs:
release:
description: 'Deploy a new release'
required: false
type: boolean
default: false
jobs:
deploy:
name: Build and Deploy FFmpeg
runs-on: blacksmith-8vcpu-ubuntu-2204
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
- name: Set up containerd image store feature
uses: nick-invision/retry@master
with:
timeout_minutes: 10
max_attempts: 3
command: |
make setup_dev_env
- name: Output Docker info
run: docker info
- name: Sets build date
run: |
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV
make set_build_multiarch
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
env:
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
- name: Build images
uses: nick-invision/retry@master
with:
timeout_minutes: 300
max_attempts: 2
retry_wait_seconds: 60
command: |
PLATFORMS="${PLATFORMS}" make ffmpeg
make tag_ffmpeg_latest
- name: Login Docker Hub
if: ${{ github.event.inputs.release == 'true' }}
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
- name: Deploy new images
if: ${{ github.event.inputs.release == 'true' }}
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 5
retry_wait_seconds: 300
continue_on_error: true
command: |
make release_ffmpeg_latest