-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Add workflow to build and deploy FFmpeg tools image
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
3 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build and Deploy FFmpeg | ||
|
||
on: | ||
push: | ||
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: ubuntu-latest | ||
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: 90 | ||
max_attempts: 2 | ||
retry_wait_seconds: 60 | ||
command: PLATFORMS="${PLATFORMS}" make ffmpeg | ||
- 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 tag_ffmpeg_latest | ||
make release_ffmpeg_latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters