Skip to content

Commit

Permalink
shio: Fork
Browse files Browse the repository at this point in the history
  • Loading branch information
mtneug committed Mar 3, 2024
1 parent 1a4e0eb commit 3aec500
Show file tree
Hide file tree
Showing 6 changed files with 1,125 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git/
.github/
build/
.dockerignore
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: main

on:
push:
branches:
- shio/master
tags:
- '*_shio.*'
pull_request:
branches:
- shio/master

env:
DOCKER_BUILDKIT: 1
OCI_REGISTRY: rg.nl-ams.scw.cloud/shio-solutions
OCI_REPO: tales-media/fork/ffmpeg

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: docker/login-action@v3
if: ${{ github.event_name == 'push' }}
with:
registry: ${{ env.OCI_REGISTRY }}
username: nologin
password: ${{ secrets.SCW_SECRET_KEY }}

- name: build and push OCI images
run: |
# info
docker version
docker info
# version
if [ "${{ github.ref_type }}" = "tag" ]; then
export VERSION="${{ github.ref_name }}"
else
export VERSION="dev-${{ github.sha }}"
fi
# build
docker build --pull --no-cache \
-f build/Dockerfile \
--build-arg "FFMPEG_VERSION=$VERSION" \
-t "${OCI_REGISTRY}/${OCI_REPO}:latest" \
-t "${OCI_REGISTRY}/${OCI_REPO}:${{ github.sha }}" \
-t "${OCI_REGISTRY}/${OCI_REPO}:$VERSION" \
.
# push
if [ "${{ github.event_name }}" = "push" ]; then
if [ "${{ github.ref_name }}" = "shio/master" ]; then
docker push "${OCI_REGISTRY}/${OCI_REPO}:latest"
fi
if [ "${{ github.ref_type }}" = "tag" ]; then
docker push "${OCI_REGISTRY}/${OCI_REPO}:$VERSION"
fi
fi
1 change: 1 addition & 0 deletions Bumpfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/Dockerfile
Loading

0 comments on commit 3aec500

Please sign in to comment.