Deploys #15
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
name: Deploys | |
on: | |
workflow_dispatch: | |
inputs: | |
VERSION: | |
description: 'FFmpeg version' | |
required: true | |
default: '7.0' | |
BASED_OS: | |
description: 'Base OS' | |
required: true | |
default: 'ubuntu2204' | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy Docker images | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_NAMESPACE: ${{vars.DOCKER_NAMESPACE}} | |
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
VERSION: ${{ github.event.inputs.VERSION || '7.0' }} | |
BASED_OS: ${{ github.event.inputs.BASED_OS || 'ubuntu2204' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Docker login | |
uses: nick-invision/[email protected] | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | |
- name: Build image | |
uses: nick-invision/[email protected] | |
with: | |
timeout_minutes: 60 | |
max_attempts: 3 | |
command: cd docker-images/$VERSION/$BASED_OS; docker build . -t $DOCKER_NAMESPACE/ffmpeg:$VERSION-$BASED_OS | |
- name: Push image | |
uses: nick-invision/[email protected] | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: docker push $DOCKER_NAMESPACE/ffmpeg:$VERSION-$BASED_OS |