From 3d0479dacb7e94c4fd856a60defbcf44b97762f8 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Mon, 19 Feb 2024 14:42:45 +0100 Subject: [PATCH 01/29] Update base alpine workflow --- .github/workflows/build_base_alpine.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_base_alpine.yaml b/.github/workflows/build_base_alpine.yaml index d169479a..75c7a6f7 100644 --- a/.github/workflows/build_base_alpine.yaml +++ b/.github/workflows/build_base_alpine.yaml @@ -56,6 +56,7 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 push: true tags: | + datarhei/base:core${{ env.CORE_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} datarhei/base:${{ env.OS_NAME }}-core-latest cache-from: type=local,src=/tmp/.buildx-cache From 17cd1a6dab190fbb27b08c7f6505cc638605e7ed Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Mon, 19 Feb 2024 15:01:11 +0100 Subject: [PATCH 02/29] Update base alpine dev workflow --- .github/workflows/build_base_alpine_dev.yaml | 153 ++++++++++--------- 1 file changed, 77 insertions(+), 76 deletions(-) diff --git a/.github/workflows/build_base_alpine_dev.yaml b/.github/workflows/build_base_alpine_dev.yaml index 6ad2d588..3a8692bf 100644 --- a/.github/workflows/build_base_alpine_dev.yaml +++ b/.github/workflows/build_base_alpine_dev.yaml @@ -1,89 +1,90 @@ -name: 'Build base:alpine-core:dev' +name: "Build base:alpine-core:dev" on: - workflow_dispatch: - workflow_call: - push: - branches: - - dev + workflow_dispatch: + workflow_call: + push: + branches: + - dev jobs: - docker: - runs-on: [self-hosted] - strategy: - matrix: - branch: - - dev + docker: + runs-on: [self-hosted] + strategy: + matrix: + branch: + - dev - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ matrix.branch }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} - - uses: actions-ecosystem/action-get-latest-tag@v1 - id: get-latest-tag - with: - semver_only: true + - uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + with: + semver_only: true - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.alpine.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' + - uses: cardinalby/export-env-action@v1 + with: + envFile: ".github_build/Build.alpine.env" + export: "true" + expandWithJobEnv: "true" + expand: "true" - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - datarhei/base - tags: | - type=raw,value=${{ env.OS_NAME }}-core-dev,enable=${{ matrix.branch == 'dev' }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + datarhei/base + tags: | + type=raw,value=${{ env.OS_NAME }}-core-dev,enable=${{ matrix.branch == 'dev' }} + type=raw,value=core-dev-${{ env.OS_NAME }}${{ env.OS_VERSION }},enable=${{ matrix.branch == 'dev' }} - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - build-args: | - BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} - GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - dockerBundle: - uses: ./.github/workflows/build_bundle_dev.yaml - secrets: inherit - dockerBundleRpi: - uses: ./.github/workflows/build_bundle-rpi_dev.yaml - secrets: inherit + - name: Build Multi-Arch + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile + build-args: | + BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} + GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + dockerBundle: + uses: ./.github/workflows/build_bundle_dev.yaml + secrets: inherit + dockerBundleRpi: + uses: ./.github/workflows/build_bundle-rpi_dev.yaml + secrets: inherit From 4917deb187f183e7707769cea548609ac0e4bf81 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Mon, 19 Feb 2024 15:15:34 +0100 Subject: [PATCH 03/29] Update dev bundles --- .github/workflows/build_bundle-rpi_dev.yaml | 117 ++++++++++---------- .github/workflows/build_bundle_dev.yaml | 117 ++++++++++---------- .github_build/Build.bundle.dev.env | 2 + .github_build/Build.bundle.rpi.dev.env | 2 + 4 files changed, 122 insertions(+), 116 deletions(-) create mode 100644 .github_build/Build.bundle.dev.env create mode 100644 .github_build/Build.bundle.rpi.dev.env diff --git a/.github/workflows/build_bundle-rpi_dev.yaml b/.github/workflows/build_bundle-rpi_dev.yaml index e26f44f7..b6618eb7 100644 --- a/.github/workflows/build_bundle-rpi_dev.yaml +++ b/.github/workflows/build_bundle-rpi_dev.yaml @@ -1,69 +1,70 @@ -name: 'Build datarhei/core:rpi-dev' +name: "Build datarhei/core:rpi-dev bundle" on: - workflow_dispatch: - workflow_call: - push: - branches-ignore: - - '**' + workflow_dispatch: + workflow_call: + push: + branches-ignore: + - "**" jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 + docker: + runs-on: [self-hosted] + steps: + - name: Checkout + uses: actions/checkout@v2 - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.alpine.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' + - uses: cardinalby/export-env-action@v1 + with: + envFile: ".github_build/Build.alpine.env" + export: "true" + expandWithJobEnv: "true" + expand: "true" - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.bundle.rpi.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' + - uses: cardinalby/export-env-action@v1 + with: + envFile: ".github_build/Build.bundle.rpi.dev.env" + export: "true" + expandWithJobEnv: "true" + expand: "true" - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-dev - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION_FFMPEG }}-${{ env.FFMPEG_VERSION }} - platforms: linux/arm64,linux/arm/v7 - push: true - tags: | - datarhei/core:rpi-dev - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + - name: Build Multi-Arch + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile.bundle + build-args: | + CORE_IMAGE=datarhei/base:core-dev-${{ env.OS_NAME }}${{ env.OS_VERSION }} + FFMPEG_IMAGE=datarhei/base:ffmpeg${{ env.FFMPEG_VERSION }}-rpi-${{ env.OS_NAME }}${{ env.OS_VERSION }} + platforms: linux/arm64,linux/arm/v7 + push: true + tags: | + datarhei/core:rpi-dev + datarhei/core:rpi-dev-ffmpeg${{ env.FFMPEG_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github/workflows/build_bundle_dev.yaml b/.github/workflows/build_bundle_dev.yaml index b8463f6a..dc788810 100644 --- a/.github/workflows/build_bundle_dev.yaml +++ b/.github/workflows/build_bundle_dev.yaml @@ -1,69 +1,70 @@ -name: 'Build datarhei/core:dev' +name: "Build datarhei/core:dev bundle" on: - workflow_dispatch: - workflow_call: - push: - branches-ignore: - - '**' + workflow_dispatch: + workflow_call: + push: + branches-ignore: + - "**" jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 + docker: + runs-on: [self-hosted] + steps: + - name: Checkout + uses: actions/checkout@v2 - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.alpine.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' + - uses: cardinalby/export-env-action@v1 + with: + envFile: ".github_build/Build.alpine.env" + export: "true" + expandWithJobEnv: "true" + expand: "true" - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.bundle.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' + - uses: cardinalby/export-env-action@v1 + with: + envFile: ".github_build/Build.bundle.dev.env" + export: "true" + expandWithJobEnv: "true" + expand: "true" - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-dev - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-${{ env.OS_VERSION_FFMPEG }}-${{ env.FFMPEG_VERSION }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: | - datarhei/core:dev - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + - name: Build Multi-Arch + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile.bundle + build-args: | + CORE_IMAGE=datarhei/base:core-dev-${{ env.OS_NAME }}${{ env.OS_VERSION }} + FFMPEG_IMAGE=datarhei/base:ffmpeg${{ env.FFMPEG_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: | + datarhei/core:dev + datarhei/core:dev-ffmpeg${{ env.FFMPEG_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github_build/Build.bundle.dev.env b/.github_build/Build.bundle.dev.env new file mode 100644 index 00000000..fb5499d0 --- /dev/null +++ b/.github_build/Build.bundle.dev.env @@ -0,0 +1,2 @@ +# CORE DEV BUNDLE +FFMPEG_VERSION=6.1.1 diff --git a/.github_build/Build.bundle.rpi.dev.env b/.github_build/Build.bundle.rpi.dev.env new file mode 100644 index 00000000..dd64c2f3 --- /dev/null +++ b/.github_build/Build.bundle.rpi.dev.env @@ -0,0 +1,2 @@ +# CORE RASPBERRY-PI DEV BUNDLE +FFMPEG_VERSION=6.1.1 From ad2969120100dac4b4fc576bf049a3cfe7d7dc74 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 14:40:49 +0100 Subject: [PATCH 04/29] Add matrix build for dev --- .github/workflows/build_base_matrix_dev.yaml | 83 ++++++++++++++++ .../workflows/build_bundle_matrix_dev.yaml | 99 +++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 .github/workflows/build_base_matrix_dev.yaml create mode 100644 .github/workflows/build_bundle_matrix_dev.yaml diff --git a/.github/workflows/build_base_matrix_dev.yaml b/.github/workflows/build_base_matrix_dev.yaml new file mode 100644 index 00000000..4a93cf0e --- /dev/null +++ b/.github/workflows/build_base_matrix_dev.yaml @@ -0,0 +1,83 @@ +name: "Build core base" + +on: + workflow_dispatch: + push: + branches: + - dev + +jobs: + docker: + runs-on: [self-hosted] + strategy: + matrix: + include: + - os: alpine + os_version: "3.19" + golang: golang:1.22-alpine3.19 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + branch: dev + - os: ubuntu + os_version: "20.04" + golang: golang:1.22-alpine3.19 + platforms: linux/amd64 + branch: dev + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + datarhei/base + tags: | + type=raw,value=core-${{ matrix.branch }}-${{ matrix.os }}${{ matrix.os_version }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Multi-Arch + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile + build-args: | + BUILD_IMAGE=${{ matrix.os }}:${{ matrix.os_version }} + GOLANG_IMAGE=${{ matrix.golang }} + platforms: ${{ matrix.platforms }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + + bundle: + uses: ./.github/workflows/build_bundle_matrix_dev.yaml + secrets: inherit diff --git a/.github/workflows/build_bundle_matrix_dev.yaml b/.github/workflows/build_bundle_matrix_dev.yaml new file mode 100644 index 00000000..e97028c3 --- /dev/null +++ b/.github/workflows/build_bundle_matrix_dev.yaml @@ -0,0 +1,99 @@ +name: "Build core dev bundles" + +on: + workflow_dispatch: + push: + branches-ignore: + - "**" + +jobs: + docker: + runs-on: [self-hosted] + strategy: + matrix: + include: + - core_os: alpine3.19 + ffmpeg: "6.1.1" + ffmpeg_os: alpine3.19 + platforms: linux/amd64,linux/arm64,linux/arm/v7 + branch: dev + prefix: + latest: yes + - core_os: alpine3.19 + ffmpeg: "6.1.1-rpi" + ffmpeg_os: alpine3.19 + platforms: linux/arm64,linux/arm/v7 + branch: dev + prefix: rpi- + latest: yes + - core_os: ubuntu20.04 + ffmpeg: "6.1.1-vaapi" + ffmpeg_os: ubuntu20.04 + platforms: linux/amd64 + branch: dev + prefix: vaapi- + latest: yes + - core_os: ubuntu20.04 + ffmpeg: "6.1.1-cuda" + ffmpeg_os: ubuntu20.04 + ffmpeg_tags: "-cuda11.7.1" + platforms: linux/amd64 + branch: dev + prefix: cuda- + latest: yes + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + datarhei/core + tags: | + type=raw,value=${{ matrix.branch }}-ffmpeg${{ matrix.ffmpeg }}${{ matrix.ffmpeg_tags }}-${{ matrix.core_os }} + # type=raw,value=${{ matrix.prefix }}${{ matrix.branch }},enable=${{ matrix.latest == 'yes' }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Multi-Arch + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile.bundle + build-args: | + CORE_IMAGE=datarhei/base:core-${{ matrix.branch }}-${{ matrix.core_os }} + FFMPEG_IMAGE=datarhei/base:ffmpeg${{ matrix.ffmpeg }}-${{ matrix.ffmpeg_os}}${{ matrix.ffmpeg_tags }} + platforms: ${{ matrix.platforms }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new From 72b3df2e1d3d3ff4dffc9afaa77405a8a3274868 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 14:47:40 +0100 Subject: [PATCH 05/29] Fix missing workflow_call event --- .github/workflows/build_base_matrix_dev.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_base_matrix_dev.yaml b/.github/workflows/build_base_matrix_dev.yaml index 4a93cf0e..0b5b7c4a 100644 --- a/.github/workflows/build_base_matrix_dev.yaml +++ b/.github/workflows/build_base_matrix_dev.yaml @@ -1,7 +1,8 @@ -name: "Build core base" +name: "Build core dev" on: workflow_dispatch: + workflow_call: push: branches: - dev @@ -77,7 +78,6 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new - - bundle: - uses: ./.github/workflows/build_bundle_matrix_dev.yaml - secrets: inherit +# bundle: +# uses: ./.github/workflows/build_bundle_matrix_dev.yaml +# secrets: inherit From 96d7100e1944785dd6ad6cebf58961dc64803153 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:11:37 +0100 Subject: [PATCH 06/29] Update bundle matrix build for dev --- .../workflows/build_bundle_matrix_dev.yaml | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_bundle_matrix_dev.yaml b/.github/workflows/build_bundle_matrix_dev.yaml index e97028c3..50043671 100644 --- a/.github/workflows/build_bundle_matrix_dev.yaml +++ b/.github/workflows/build_bundle_matrix_dev.yaml @@ -2,6 +2,7 @@ name: "Build core dev bundles" on: workflow_dispatch: + workflow_call: push: branches-ignore: - "**" @@ -26,21 +27,21 @@ jobs: branch: dev prefix: rpi- latest: yes - - core_os: ubuntu20.04 - ffmpeg: "6.1.1-vaapi" - ffmpeg_os: ubuntu20.04 - platforms: linux/amd64 - branch: dev - prefix: vaapi- - latest: yes - - core_os: ubuntu20.04 - ffmpeg: "6.1.1-cuda" - ffmpeg_os: ubuntu20.04 - ffmpeg_tags: "-cuda11.7.1" - platforms: linux/amd64 - branch: dev - prefix: cuda- - latest: yes + # - core_os: ubuntu20.04 + # ffmpeg: "6.1.1-vaapi" + # ffmpeg_os: ubuntu20.04 + # platforms: linux/amd64 + # branch: dev + # prefix: vaapi- + # latest: yes + # - core_os: ubuntu20.04 + # ffmpeg: "6.1.1-cuda" + # ffmpeg_os: ubuntu20.04 + # ffmpeg_tags: "-cuda11.7.1" + # platforms: linux/amd64 + # branch: dev + # prefix: cuda- + # latest: yes steps: - name: Checkout @@ -68,7 +69,7 @@ jobs: uses: docker/setup-buildx-action@master - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} @@ -77,13 +78,13 @@ jobs: - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build Multi-Arch - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: builder: ${{ steps.buildx.outputs.name }} context: . From 647f625a55f4e14ff1a20526cbe42b7ac94f6c5e Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:20:32 +0100 Subject: [PATCH 07/29] Update action versions --- .github/workflows/build_base_matrix_dev.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base_matrix_dev.yaml b/.github/workflows/build_base_matrix_dev.yaml index 0b5b7c4a..41455c2d 100644 --- a/.github/workflows/build_base_matrix_dev.yaml +++ b/.github/workflows/build_base_matrix_dev.yaml @@ -49,7 +49,7 @@ jobs: uses: docker/setup-buildx-action@master - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} @@ -58,13 +58,13 @@ jobs: - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build Multi-Arch - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: builder: ${{ steps.buildx.outputs.name }} context: . From 51afa34ed6e7e1455da44e2d38c316415bf69aa4 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:26:11 +0100 Subject: [PATCH 08/29] Update dev workflows --- .github/workflows/build_base_matrix_dev.yaml | 6 +++--- .github/workflows/build_bundle_matrix_dev.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_base_matrix_dev.yaml b/.github/workflows/build_base_matrix_dev.yaml index 41455c2d..78f22af6 100644 --- a/.github/workflows/build_base_matrix_dev.yaml +++ b/.github/workflows/build_base_matrix_dev.yaml @@ -78,6 +78,6 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new -# bundle: -# uses: ./.github/workflows/build_bundle_matrix_dev.yaml -# secrets: inherit + bundle: + uses: ./.github/workflows/build_bundle_matrix_dev.yaml + secrets: inherit diff --git a/.github/workflows/build_bundle_matrix_dev.yaml b/.github/workflows/build_bundle_matrix_dev.yaml index 50043671..ed20e1cc 100644 --- a/.github/workflows/build_bundle_matrix_dev.yaml +++ b/.github/workflows/build_bundle_matrix_dev.yaml @@ -57,7 +57,7 @@ jobs: datarhei/core tags: | type=raw,value=${{ matrix.branch }}-ffmpeg${{ matrix.ffmpeg }}${{ matrix.ffmpeg_tags }}-${{ matrix.core_os }} - # type=raw,value=${{ matrix.prefix }}${{ matrix.branch }},enable=${{ matrix.latest == 'yes' }} + type=raw,value=${{ matrix.prefix }}${{ matrix.branch }},enable=${{ matrix.latest == 'yes' }} - name: Set up QEMU uses: docker/setup-qemu-action@master From b4904eabe72c7288960fbb09ff37add5871502f9 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:26:53 +0100 Subject: [PATCH 09/29] Remove deprecated workflows --- .github/workflows/build_base_alpine_dev.yaml | 90 -------------------- .github/workflows/build_bundle-rpi_dev.yaml | 70 --------------- .github/workflows/build_bundle_dev.yaml | 70 --------------- .github_build/Build.bundle.dev.env | 2 - .github_build/Build.bundle.rpi.dev.env | 2 - 5 files changed, 234 deletions(-) delete mode 100644 .github/workflows/build_base_alpine_dev.yaml delete mode 100644 .github/workflows/build_bundle-rpi_dev.yaml delete mode 100644 .github/workflows/build_bundle_dev.yaml delete mode 100644 .github_build/Build.bundle.dev.env delete mode 100644 .github_build/Build.bundle.rpi.dev.env diff --git a/.github/workflows/build_base_alpine_dev.yaml b/.github/workflows/build_base_alpine_dev.yaml deleted file mode 100644 index 3a8692bf..00000000 --- a/.github/workflows/build_base_alpine_dev.yaml +++ /dev/null @@ -1,90 +0,0 @@ -name: "Build base:alpine-core:dev" - -on: - workflow_dispatch: - workflow_call: - push: - branches: - - dev - -jobs: - docker: - runs-on: [self-hosted] - strategy: - matrix: - branch: - - dev - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ matrix.branch }} - - - uses: actions-ecosystem/action-get-latest-tag@v1 - id: get-latest-tag - with: - semver_only: true - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.alpine.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - datarhei/base - tags: | - type=raw,value=${{ env.OS_NAME }}-core-dev,enable=${{ matrix.branch == 'dev' }} - type=raw,value=core-dev-${{ env.OS_NAME }}${{ env.OS_VERSION }},enable=${{ matrix.branch == 'dev' }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - build-args: | - BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} - GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - dockerBundle: - uses: ./.github/workflows/build_bundle_dev.yaml - secrets: inherit - dockerBundleRpi: - uses: ./.github/workflows/build_bundle-rpi_dev.yaml - secrets: inherit diff --git a/.github/workflows/build_bundle-rpi_dev.yaml b/.github/workflows/build_bundle-rpi_dev.yaml deleted file mode 100644 index b6618eb7..00000000 --- a/.github/workflows/build_bundle-rpi_dev.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: "Build datarhei/core:rpi-dev bundle" - -on: - workflow_dispatch: - workflow_call: - push: - branches-ignore: - - "**" - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.alpine.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.bundle.rpi.dev.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:core-dev-${{ env.OS_NAME }}${{ env.OS_VERSION }} - FFMPEG_IMAGE=datarhei/base:ffmpeg${{ env.FFMPEG_VERSION }}-rpi-${{ env.OS_NAME }}${{ env.OS_VERSION }} - platforms: linux/arm64,linux/arm/v7 - push: true - tags: | - datarhei/core:rpi-dev - datarhei/core:rpi-dev-ffmpeg${{ env.FFMPEG_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github/workflows/build_bundle_dev.yaml b/.github/workflows/build_bundle_dev.yaml deleted file mode 100644 index dc788810..00000000 --- a/.github/workflows/build_bundle_dev.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: "Build datarhei/core:dev bundle" - -on: - workflow_dispatch: - workflow_call: - push: - branches-ignore: - - "**" - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.alpine.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.bundle.dev.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:core-dev-${{ env.OS_NAME }}${{ env.OS_VERSION }} - FFMPEG_IMAGE=datarhei/base:ffmpeg${{ env.FFMPEG_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: | - datarhei/core:dev - datarhei/core:dev-ffmpeg${{ env.FFMPEG_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github_build/Build.bundle.dev.env b/.github_build/Build.bundle.dev.env deleted file mode 100644 index fb5499d0..00000000 --- a/.github_build/Build.bundle.dev.env +++ /dev/null @@ -1,2 +0,0 @@ -# CORE DEV BUNDLE -FFMPEG_VERSION=6.1.1 diff --git a/.github_build/Build.bundle.rpi.dev.env b/.github_build/Build.bundle.rpi.dev.env deleted file mode 100644 index dd64c2f3..00000000 --- a/.github_build/Build.bundle.rpi.dev.env +++ /dev/null @@ -1,2 +0,0 @@ -# CORE RASPBERRY-PI DEV BUNDLE -FFMPEG_VERSION=6.1.1 From ea4c6601770ae4223671f0dfa1e06b2cdca7b6de Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:32:03 +0100 Subject: [PATCH 10/29] Remove deprecated ubuntu dev workflow --- .github/workflows/build_base_ubuntu_dev.yaml | 83 -------------------- 1 file changed, 83 deletions(-) delete mode 100644 .github/workflows/build_base_ubuntu_dev.yaml diff --git a/.github/workflows/build_base_ubuntu_dev.yaml b/.github/workflows/build_base_ubuntu_dev.yaml deleted file mode 100644 index 33013fbe..00000000 --- a/.github/workflows/build_base_ubuntu_dev.yaml +++ /dev/null @@ -1,83 +0,0 @@ -name: 'Build datarhei/base:ubuntu-core-dev' - -on: - workflow_dispatch: - workflow_call: - push: - branches: - - dev - -jobs: - docker: - runs-on: [self-hosted] - strategy: - matrix: - branch: - - dev - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ matrix.branch }} - - - uses: actions-ecosystem/action-get-latest-tag@v1 - id: get-latest-tag - with: - semver_only: true - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.ubuntu.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - datarhei/base - tags: | - type=raw,value=${{ env.OS_NAME }}-core-dev,enable=${{ matrix.branch == 'dev' }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - build-args: | - BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} - GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} - platforms: linux/amd64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new From 4caaa1d110729e36865df3fa0528b665f3e9444e Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:32:45 +0100 Subject: [PATCH 11/29] Add base matrix build for vod branch --- .github/workflows/build_base_matrix_vod.yaml | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/build_base_matrix_vod.yaml diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml new file mode 100644 index 00000000..3f6046d6 --- /dev/null +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -0,0 +1,80 @@ +name: "Build core vod" + +on: + workflow_dispatch: + workflow_call: + push: + branches: + - vod + +jobs: + docker: + runs-on: [self-hosted] + strategy: + matrix: + include: + - os: alpine + os_version: "3.19" + golang: golang:1.22-alpine3.19 + platforms: linux/amd64,linux/arm64 + branch: vod + - os: alpine + os_version: "3.16" + golang: golang:1.21-alpine3.16 + platforms: linux/amd64,linux/arm64 + branch: vod + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + datarhei/base + tags: | + type=raw,value=core-${{ matrix.branch }}-${{ matrix.os }}${{ matrix.os_version }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master + + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Multi-Arch + uses: docker/build-push-action@v5 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile + build-args: | + BUILD_IMAGE=${{ matrix.os }}:${{ matrix.os_version }} + GOLANG_IMAGE=${{ matrix.golang }} + platforms: ${{ matrix.platforms }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new From c3cd48c67a3e8ce238fea3cdf22670f3d3d0bd34 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 15:39:53 +0100 Subject: [PATCH 12/29] Remove unneeded build --- .github/workflows/build_base_matrix_vod.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index 3f6046d6..d10df54c 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -18,11 +18,6 @@ jobs: golang: golang:1.22-alpine3.19 platforms: linux/amd64,linux/arm64 branch: vod - - os: alpine - os_version: "3.16" - golang: golang:1.21-alpine3.16 - platforms: linux/amd64,linux/arm64 - branch: vod steps: - name: Checkout From 6dff92f701afd8f277cf11a297c7a528566c0c59 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 16:13:12 +0100 Subject: [PATCH 13/29] Remove deprecated workflow --- .github/workflows/build_base_alpine_vod.yaml | 83 -------------------- 1 file changed, 83 deletions(-) delete mode 100644 .github/workflows/build_base_alpine_vod.yaml diff --git a/.github/workflows/build_base_alpine_vod.yaml b/.github/workflows/build_base_alpine_vod.yaml deleted file mode 100644 index fddc58a8..00000000 --- a/.github/workflows/build_base_alpine_vod.yaml +++ /dev/null @@ -1,83 +0,0 @@ -name: 'Build base:alpine-core:vod' - -on: - workflow_dispatch: - workflow_call: - push: - branches: - - vod - -jobs: - docker: - runs-on: [self-hosted] - strategy: - matrix: - branch: - - vod - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ matrix.branch }} - - - uses: actions-ecosystem/action-get-latest-tag@v1 - id: get-latest-tag - with: - semver_only: true - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.alpine.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - datarhei/base - tags: | - type=raw,value=${{ env.OS_NAME }}-core-vod,enable=${{ matrix.branch == 'vod' }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - build-args: | - BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} - GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} - platforms: linux/amd64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new From c40b9b3b08c8bb430065b3d3854be4d905336c02 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 16:13:55 +0100 Subject: [PATCH 14/29] Add build matrix for main branch --- .github/workflows/build_base_matrix.yaml | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/build_base_matrix.yaml diff --git a/.github/workflows/build_base_matrix.yaml b/.github/workflows/build_base_matrix.yaml new file mode 100644 index 00000000..9c500815 --- /dev/null +++ b/.github/workflows/build_base_matrix.yaml @@ -0,0 +1,86 @@ +name: "Build core base" + +on: + workflow_dispatch: + workflow_call: + push: + branches-ignore: + - "**" + +jobs: + docker: + runs-on: [self-hosted] + strategy: + matrix: + include: + - core: "16.14.0" + os: alpine + os_version: "3.19" + golang: golang:1.21-alpine3.19 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + branch: main + latest: yes + - core: "16.14.0" + os: ubuntu + os_version: "20.04" + golang: golang:1.21-alpine3.19 + platforms: linux/amd64 + branch: main + latest: yes + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + datarhei/base + tags: | + type=raw,value=core${{ matrix.core }}-${{ matrix.os }}${{ matrix.os_version }} + # type=raw,value=${{ matrix.os }}-core-${{ matrix.os_version }}-${{ matrix.core}},enable=${{ matrix.latest == 'yes' }} + # type=raw,value=${{ matrix.os }}-core-latest,enable=${{ matrix.latest == 'yes' }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master + + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Multi-Arch + uses: docker/build-push-action@v5 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile + build-args: | + BUILD_IMAGE=${{ matrix.os }}:${{ matrix.os_version }} + GOLANG_IMAGE=${{ matrix.golang }} + platforms: ${{ matrix.platforms }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new From 456cca720d1e79e5c266d3a2a884e3c317c78a2e Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 16:37:37 +0100 Subject: [PATCH 15/29] Enable legacy tags, rename workflow --- .github/workflows/build_base_matrix.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base_matrix.yaml b/.github/workflows/build_base_matrix.yaml index 9c500815..542b951e 100644 --- a/.github/workflows/build_base_matrix.yaml +++ b/.github/workflows/build_base_matrix.yaml @@ -1,4 +1,4 @@ -name: "Build core base" +name: "Build main base" on: workflow_dispatch: @@ -42,8 +42,8 @@ jobs: datarhei/base tags: | type=raw,value=core${{ matrix.core }}-${{ matrix.os }}${{ matrix.os_version }} - # type=raw,value=${{ matrix.os }}-core-${{ matrix.os_version }}-${{ matrix.core}},enable=${{ matrix.latest == 'yes' }} - # type=raw,value=${{ matrix.os }}-core-latest,enable=${{ matrix.latest == 'yes' }} + type=raw,value=${{ matrix.os }}-core-${{ matrix.os_version }}-${{ matrix.core}},enable=${{ matrix.latest == 'yes' }} + type=raw,value=${{ matrix.os }}-core-latest,enable=${{ matrix.latest == 'yes' }} - name: Set up QEMU uses: docker/setup-qemu-action@master From d20aadc8b6b02d78c395b457f9d7a255e380dd38 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 16:40:05 +0100 Subject: [PATCH 16/29] Remove deprecated workflows --- .github/workflows/build_base_alpine.yaml | 63 ------------------------ .github/workflows/build_base_ubuntu.yaml | 62 ----------------------- 2 files changed, 125 deletions(-) delete mode 100644 .github/workflows/build_base_alpine.yaml delete mode 100644 .github/workflows/build_base_ubuntu.yaml diff --git a/.github/workflows/build_base_alpine.yaml b/.github/workflows/build_base_alpine.yaml deleted file mode 100644 index 75c7a6f7..00000000 --- a/.github/workflows/build_base_alpine.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: "Build base:alpine-core" - -on: - workflow_dispatch: - push: - branches-ignore: - - "**" - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.alpine.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - build-args: | - BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} - GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 - push: true - tags: | - datarhei/base:core${{ env.CORE_VERSION }}-${{ env.OS_NAME }}${{ env.OS_VERSION }} - datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} - datarhei/base:${{ env.OS_NAME }}-core-latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github/workflows/build_base_ubuntu.yaml b/.github/workflows/build_base_ubuntu.yaml deleted file mode 100644 index 8974b18d..00000000 --- a/.github/workflows/build_base_ubuntu.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: 'Build base:ubuntu-core' - -on: - workflow_dispatch: - push: - branches-ignore: - - '**' - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.ubuntu.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - build-args: | - BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }} - GOLANG_IMAGE=${{ env.GOLANG_IMAGE }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: | - datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} - datarhei/base:${{ env.OS_NAME }}-core-latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new From 7f438fa7a86137a9ffe9c26249a0fd38c3de58ae Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 16:41:57 +0100 Subject: [PATCH 17/29] Rename workflows --- .github/workflows/build_base_matrix_dev.yaml | 2 +- .github/workflows/build_base_matrix_vod.yaml | 2 +- .github/workflows/build_bundle_matrix_dev.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base_matrix_dev.yaml b/.github/workflows/build_base_matrix_dev.yaml index 78f22af6..6465c721 100644 --- a/.github/workflows/build_base_matrix_dev.yaml +++ b/.github/workflows/build_base_matrix_dev.yaml @@ -1,4 +1,4 @@ -name: "Build core dev" +name: "Build dev base" on: workflow_dispatch: diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index d10df54c..460dde15 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -1,4 +1,4 @@ -name: "Build core vod" +name: "Build vod base" on: workflow_dispatch: diff --git a/.github/workflows/build_bundle_matrix_dev.yaml b/.github/workflows/build_bundle_matrix_dev.yaml index ed20e1cc..0adac3e9 100644 --- a/.github/workflows/build_bundle_matrix_dev.yaml +++ b/.github/workflows/build_bundle_matrix_dev.yaml @@ -1,4 +1,4 @@ -name: "Build core dev bundles" +name: "Build dev bundles" on: workflow_dispatch: From b5fad743b56047a2a0af053c643f79c543beaffc Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 20 Feb 2024 20:21:32 +0100 Subject: [PATCH 18/29] Add matrix entry for older alpine version --- .github/workflows/build_base_matrix_vod.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index 460dde15..caa40893 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -18,6 +18,11 @@ jobs: golang: golang:1.22-alpine3.19 platforms: linux/amd64,linux/arm64 branch: vod + - os: alpine + os_version: "3.16" + golang: golang:1.19-alpine3.16 + platforms: linux/amd64,linux/arm64 + branch: vod steps: - name: Checkout From 3d8177672038e91bf43cfe9e9007629b7780ce06 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 11:15:29 +0100 Subject: [PATCH 19/29] Fix buildx caching --- .github/workflows/build_base_matrix_vod.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index caa40893..a37579cb 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -7,6 +7,9 @@ on: branches: - vod +env: + cachedir: /tmp/.buildx-cache-core-vod + jobs: docker: runs-on: [self-hosted] @@ -51,7 +54,7 @@ jobs: - name: Cache Docker layers uses: actions/cache@v4 with: - path: /tmp/.buildx-cache + path: ${{ env.cachedir }} key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- @@ -76,5 +79,12 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + cache-from: type=local,src=${{ env.cachedir }} + cache-to: type=local,dest=${{ env.cachedir }}-new,mode=max + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf ${{ env.cachedir }} + mv ${{ env.cachedir }}-new ${{ env.cachedir }} From 5c33864ff9bbe4692366852d540d8f37ca535d44 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 11:30:02 +0100 Subject: [PATCH 20/29] Fix buildx caching --- .github/workflows/build_base_matrix_vod.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index a37579cb..1254b7cf 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -21,11 +21,13 @@ jobs: golang: golang:1.22-alpine3.19 platforms: linux/amd64,linux/arm64 branch: vod + key: alpine3.19 - os: alpine os_version: "3.16" golang: golang:1.19-alpine3.16 platforms: linux/amd64,linux/arm64 branch: vod + key: alpine3.16 steps: - name: Checkout @@ -54,7 +56,7 @@ jobs: - name: Cache Docker layers uses: actions/cache@v4 with: - path: ${{ env.cachedir }} + path: ${{ env.cachedir }}-${{ matrix.key }} key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- @@ -79,12 +81,12 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=${{ env.cachedir }} - cache-to: type=local,dest=${{ env.cachedir }}-new,mode=max + cache-from: type=local,src=${{ env.cachedir }}-${{ matrix.key }} + cache-to: type=local,dest=${{ env.cachedir }}-${{ matrix.key }}-new,mode=max - # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 name: Move cache run: | - rm -rf ${{ env.cachedir }} - mv ${{ env.cachedir }}-new ${{ env.cachedir }} + rm -rf ${{ env.cachedir }}-${{ matrix.key }} + mv ${{ env.cachedir }}-${{ matrix.key }}-new ${{ env.cachedir }}-${{ matrix.key }} From 06e8dc55edd482f4a3394ef8d1051567dfbdc160 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 12:56:34 +0100 Subject: [PATCH 21/29] Upgrade actions --- .github/workflows/build_base_matrix_vod.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index 1254b7cf..87e9b024 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -31,13 +31,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | datarhei/base @@ -57,9 +57,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.cachedir }}-${{ matrix.key }} - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.key }} - name: Login to DockerHub if: github.event_name != 'pull_request' From c4fb342cf30f2af3cf00d88230ef345c0060f5f1 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 20:46:30 +0100 Subject: [PATCH 22/29] Add build matrix workflow for bundles --- .github/workflows/build_bundle_matrix.yaml | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 .github/workflows/build_bundle_matrix.yaml diff --git a/.github/workflows/build_bundle_matrix.yaml b/.github/workflows/build_bundle_matrix.yaml new file mode 100644 index 00000000..8dfc5811 --- /dev/null +++ b/.github/workflows/build_bundle_matrix.yaml @@ -0,0 +1,130 @@ +name: "Build main bundles" + +on: + workflow_dispatch: + workflow_call: + schedule: + - cron: "7 5 * * *" + push: + branches-ignore: + - "**" + +jobs: + docker: + runs-on: [self-hosted] + strategy: + matrix: + include: + - core: "16.14.0" + core_os: alpine3.19 + ffmpeg: "6.1.1" + ffmpeg_os: alpine3.19 + platforms: linux/amd64,linux/arm64,linux/arm/v7 + branch: main + prefix: + latest: no + - core: "16.14.0" + core_os: alpine3.19 + ffmpeg: "6.1.1-rpi" + ffmpeg_os: alpine3.19 + platforms: linux/arm64,linux/arm/v7 + branch: main + prefix: rpi- + latest: no + - core: "16.14.0" + core_os: ubuntu20.04 + ffmpeg: "6.1.1-vaapi" + ffmpeg_os: ubuntu20.04 + platforms: linux/amd64 + branch: main + prefix: vaapi- + latest: no + - core: "16.14.0" + core_os: ubuntu20.04 + ffmpeg: "6.1.1-cuda" + ffmpeg_os: ubuntu20.04 + ffmpeg_tags: "-cuda11.7.1" + platforms: linux/amd64 + branch: main + prefix: cuda- + latest: no + - core: "16.14.0" + core_os: alpine3.19 + ffmpeg: "5.1.3" + ffmpeg_os: alpine3.16 + platforms: linux/amd64,linux/arm64,linux/arm/v7 + branch: main + prefix: + latest: yes + - core: "16.14.0" + core_os: alpine3.19 + ffmpeg: "5.1.3-rpi" + ffmpeg_os: alpine3.16 + platforms: linux/arm64,linux/arm/v7 + branch: main + prefix: rpi- + latest: yes + - core: "16.14.0" + core_os: ubuntu20.04 + ffmpeg: "5.1.3-vaapi" + ffmpeg_os: ubuntu20.04 + platforms: linux/amd64 + branch: main + prefix: vaapi- + latest: yes + - core: "16.14.0" + core_os: ubuntu20.04 + ffmpeg: "5.1.3-cuda" + ffmpeg_os: ubuntu20.04 + ffmpeg_tags: "-cuda11.7.1" + platforms: linux/amd64 + branch: main + prefix: cuda- + latest: yes + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ matrix.branch }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + datarhei/core + tags: | + type=raw,value=${{ matrix.core }}-ffmpeg${{ matrix.ffmpeg }}${{ matrix.ffmpeg_tags }}-${{ matrix.core_os }} + # type=raw,value=${{ matrix.prefix }}${{ matrix.core }},enable=${{ matrix.latest == 'yes' }} + # type=raw,value=${{ matrix.prefix }}latest,enable=${{ matrix.latest == 'yes' }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Multi-Arch + uses: docker/build-push-action@v5 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile.bundle + build-args: | + CORE_IMAGE=datarhei/base:core${{ matrix.core }}-${{ matrix.core_os }} + FFMPEG_IMAGE=datarhei/base:ffmpeg${{ matrix.ffmpeg }}-${{ matrix.ffmpeg_os}}${{ matrix.ffmpeg_tags }} + platforms: ${{ matrix.platforms }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 4c7b3a6e7cee193aca19f9dc14c9e06fe8922cff Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:12:03 +0100 Subject: [PATCH 23/29] Enable legacy tags, remove ffmpeg6 bundles --- .github/workflows/build_bundle_matrix.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_bundle_matrix.yaml b/.github/workflows/build_bundle_matrix.yaml index 8dfc5811..98ebae75 100644 --- a/.github/workflows/build_bundle_matrix.yaml +++ b/.github/workflows/build_bundle_matrix.yaml @@ -14,7 +14,7 @@ jobs: runs-on: [self-hosted] strategy: matrix: - include: + exclude: - core: "16.14.0" core_os: alpine3.19 ffmpeg: "6.1.1" @@ -48,6 +48,7 @@ jobs: branch: main prefix: cuda- latest: no + include: - core: "16.14.0" core_os: alpine3.19 ffmpeg: "5.1.3" @@ -96,8 +97,8 @@ jobs: datarhei/core tags: | type=raw,value=${{ matrix.core }}-ffmpeg${{ matrix.ffmpeg }}${{ matrix.ffmpeg_tags }}-${{ matrix.core_os }} - # type=raw,value=${{ matrix.prefix }}${{ matrix.core }},enable=${{ matrix.latest == 'yes' }} - # type=raw,value=${{ matrix.prefix }}latest,enable=${{ matrix.latest == 'yes' }} + type=raw,value=${{ matrix.prefix }}${{ matrix.core }},enable=${{ matrix.latest == 'yes' }} + type=raw,value=${{ matrix.prefix }}latest,enable=${{ matrix.latest == 'yes' }} - name: Set up QEMU uses: docker/setup-qemu-action@master From f8ce102cf04d5447cdefdf4377c646fa6e2752af Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:14:06 +0100 Subject: [PATCH 24/29] Fix matrix build --- .github/workflows/build_bundle_matrix.yaml | 34 ---------------------- 1 file changed, 34 deletions(-) diff --git a/.github/workflows/build_bundle_matrix.yaml b/.github/workflows/build_bundle_matrix.yaml index 98ebae75..cb839aac 100644 --- a/.github/workflows/build_bundle_matrix.yaml +++ b/.github/workflows/build_bundle_matrix.yaml @@ -14,40 +14,6 @@ jobs: runs-on: [self-hosted] strategy: matrix: - exclude: - - core: "16.14.0" - core_os: alpine3.19 - ffmpeg: "6.1.1" - ffmpeg_os: alpine3.19 - platforms: linux/amd64,linux/arm64,linux/arm/v7 - branch: main - prefix: - latest: no - - core: "16.14.0" - core_os: alpine3.19 - ffmpeg: "6.1.1-rpi" - ffmpeg_os: alpine3.19 - platforms: linux/arm64,linux/arm/v7 - branch: main - prefix: rpi- - latest: no - - core: "16.14.0" - core_os: ubuntu20.04 - ffmpeg: "6.1.1-vaapi" - ffmpeg_os: ubuntu20.04 - platforms: linux/amd64 - branch: main - prefix: vaapi- - latest: no - - core: "16.14.0" - core_os: ubuntu20.04 - ffmpeg: "6.1.1-cuda" - ffmpeg_os: ubuntu20.04 - ffmpeg_tags: "-cuda11.7.1" - platforms: linux/amd64 - branch: main - prefix: cuda- - latest: no include: - core: "16.14.0" core_os: alpine3.19 From e487d5e095b377c13987266a3f165e3564481fea Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:18:00 +0100 Subject: [PATCH 25/29] Remove deprecated workflows --- .github/workflows/build_bundle-cuda.yaml | 71 ----------------------- .github/workflows/build_bundle-rpi.yaml | 71 ----------------------- .github/workflows/build_bundle-vaapi.yaml | 71 ----------------------- .github/workflows/build_bundle.yaml | 71 ----------------------- .github_build/Build.alpine.env | 6 -- .github_build/Build.bundle.cuda.env | 3 - .github_build/Build.bundle.env | 2 - .github_build/Build.bundle.rpi.env | 2 - .github_build/Build.bundle.vaapi.env | 2 - .github_build/Build.ubuntu.env | 5 -- 10 files changed, 304 deletions(-) delete mode 100644 .github/workflows/build_bundle-cuda.yaml delete mode 100644 .github/workflows/build_bundle-rpi.yaml delete mode 100644 .github/workflows/build_bundle-vaapi.yaml delete mode 100644 .github/workflows/build_bundle.yaml delete mode 100644 .github_build/Build.alpine.env delete mode 100644 .github_build/Build.bundle.cuda.env delete mode 100644 .github_build/Build.bundle.env delete mode 100644 .github_build/Build.bundle.rpi.env delete mode 100644 .github_build/Build.bundle.vaapi.env delete mode 100644 .github_build/Build.ubuntu.env diff --git a/.github/workflows/build_bundle-cuda.yaml b/.github/workflows/build_bundle-cuda.yaml deleted file mode 100644 index cf3cb617..00000000 --- a/.github/workflows/build_bundle-cuda.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: 'Build core:cuda' - -on: - workflow_dispatch: - schedule: - - cron: '7 5 * * *' - push: - branches-ignore: - - '**' - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.ubuntu.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.bundle.cuda.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-cuda-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }}-${{ env.CUDA_VERSION }} - platforms: linux/amd64 - push: true - tags: | - datarhei/core:cuda-${{ env.CORE_VERSION }} - datarhei/core:cuda-latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github/workflows/build_bundle-rpi.yaml b/.github/workflows/build_bundle-rpi.yaml deleted file mode 100644 index 2f340d92..00000000 --- a/.github/workflows/build_bundle-rpi.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: "Build core:rpi" - -on: - workflow_dispatch: - schedule: - - cron: "7 5 * * *" - push: - branches-ignore: - - "**" - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.alpine.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - uses: cardinalby/export-env-action@v1 - with: - envFile: ".github_build/Build.bundle.rpi.env" - export: "true" - expandWithJobEnv: "true" - expand: "true" - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION_FFMPEG }}-${{ env.FFMPEG_VERSION }} - platforms: linux/arm/v7,linux/arm64 - push: true - tags: | - datarhei/core:rpi-${{ env.CORE_VERSION }} - datarhei/core:rpi-latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github/workflows/build_bundle-vaapi.yaml b/.github/workflows/build_bundle-vaapi.yaml deleted file mode 100644 index 52a5c857..00000000 --- a/.github/workflows/build_bundle-vaapi.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: 'Build core:vaapi' - -on: - workflow_dispatch: - schedule: - - cron: '7 5 * * *' - push: - branches-ignore: - - '**' - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.ubuntu.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.bundle.vaapi.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-vaapi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }} - platforms: linux/amd64 - push: true - tags: | - datarhei/core:vaapi-${{ env.CORE_VERSION }} - datarhei/core:vaapi-latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github/workflows/build_bundle.yaml b/.github/workflows/build_bundle.yaml deleted file mode 100644 index 69292c3f..00000000 --- a/.github/workflows/build_bundle.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: 'Build core' - -on: - workflow_dispatch: - schedule: - - cron: '7 5 * * *' - push: - branches-ignore: - - '**' - -jobs: - docker: - runs-on: [self-hosted] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.alpine.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - uses: cardinalby/export-env-action@v1 - with: - envFile: '.github_build/Build.bundle.env' - export: 'true' - expandWithJobEnv: 'true' - expand: 'true' - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build Multi-Arch - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile.bundle - build-args: | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-${{ env.OS_VERSION_FFMPEG }}-${{ env.FFMPEG_VERSION }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: | - datarhei/core:${{ env.CORE_VERSION }} - datarhei/core:latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new diff --git a/.github_build/Build.alpine.env b/.github_build/Build.alpine.env deleted file mode 100644 index 66e888c9..00000000 --- a/.github_build/Build.alpine.env +++ /dev/null @@ -1,6 +0,0 @@ -# CORE ALPINE BASE IMAGE -OS_NAME=alpine -OS_VERSION=3.19 -OS_VERSION_FFMPEG=3.16 -GOLANG_IMAGE=golang:1.21-alpine3.19 -CORE_VERSION=16.14.0 diff --git a/.github_build/Build.bundle.cuda.env b/.github_build/Build.bundle.cuda.env deleted file mode 100644 index be91c889..00000000 --- a/.github_build/Build.bundle.cuda.env +++ /dev/null @@ -1,3 +0,0 @@ -# CORE NVIDIA CUDA BUNDLE -FFMPEG_VERSION=5.1.3 -CUDA_VERSION=11.7.1 diff --git a/.github_build/Build.bundle.env b/.github_build/Build.bundle.env deleted file mode 100644 index 6758f80d..00000000 --- a/.github_build/Build.bundle.env +++ /dev/null @@ -1,2 +0,0 @@ -# CORE BUNDLE -FFMPEG_VERSION=5.1.3 diff --git a/.github_build/Build.bundle.rpi.env b/.github_build/Build.bundle.rpi.env deleted file mode 100644 index 3dbe35a9..00000000 --- a/.github_build/Build.bundle.rpi.env +++ /dev/null @@ -1,2 +0,0 @@ -# CORE RASPBERRY-PI BUNDLE -FFMPEG_VERSION=5.1.3 diff --git a/.github_build/Build.bundle.vaapi.env b/.github_build/Build.bundle.vaapi.env deleted file mode 100644 index 6758f80d..00000000 --- a/.github_build/Build.bundle.vaapi.env +++ /dev/null @@ -1,2 +0,0 @@ -# CORE BUNDLE -FFMPEG_VERSION=5.1.3 diff --git a/.github_build/Build.ubuntu.env b/.github_build/Build.ubuntu.env deleted file mode 100644 index df5d5738..00000000 --- a/.github_build/Build.ubuntu.env +++ /dev/null @@ -1,5 +0,0 @@ -# CORE UBUNTU BASE IMAGE -OS_NAME=ubuntu -OS_VERSION=20.04 -GOLANG_IMAGE=golang:1.21-alpine3.19 -CORE_VERSION=16.14.0 From 9381952175d3cb4189b1f7a87304de8df4a80d66 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:19:10 +0100 Subject: [PATCH 26/29] Rename workflow files --- .github/workflows/{build_base_matrix.yaml => build_base.yaml} | 0 .../workflows/{build_base_matrix_dev.yaml => build_base_dev.yaml} | 0 .../workflows/{build_base_matrix_vod.yaml => build_base_vod.yaml} | 0 .github/workflows/{build_bundle_matrix.yaml => build_bundle.yaml} | 0 .../{build_bundle_matrix_dev.yaml => build_bundle_dev.yaml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build_base_matrix.yaml => build_base.yaml} (100%) rename .github/workflows/{build_base_matrix_dev.yaml => build_base_dev.yaml} (100%) rename .github/workflows/{build_base_matrix_vod.yaml => build_base_vod.yaml} (100%) rename .github/workflows/{build_bundle_matrix.yaml => build_bundle.yaml} (100%) rename .github/workflows/{build_bundle_matrix_dev.yaml => build_bundle_dev.yaml} (100%) diff --git a/.github/workflows/build_base_matrix.yaml b/.github/workflows/build_base.yaml similarity index 100% rename from .github/workflows/build_base_matrix.yaml rename to .github/workflows/build_base.yaml diff --git a/.github/workflows/build_base_matrix_dev.yaml b/.github/workflows/build_base_dev.yaml similarity index 100% rename from .github/workflows/build_base_matrix_dev.yaml rename to .github/workflows/build_base_dev.yaml diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_vod.yaml similarity index 100% rename from .github/workflows/build_base_matrix_vod.yaml rename to .github/workflows/build_base_vod.yaml diff --git a/.github/workflows/build_bundle_matrix.yaml b/.github/workflows/build_bundle.yaml similarity index 100% rename from .github/workflows/build_bundle_matrix.yaml rename to .github/workflows/build_bundle.yaml diff --git a/.github/workflows/build_bundle_matrix_dev.yaml b/.github/workflows/build_bundle_dev.yaml similarity index 100% rename from .github/workflows/build_bundle_matrix_dev.yaml rename to .github/workflows/build_bundle_dev.yaml From 4bc4b6be1dd132336ea571d360e713257598a385 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:22:28 +0100 Subject: [PATCH 27/29] Enable ubuntu bundles --- .github/workflows/build_bundle_dev.yaml | 40 ++++++++++--------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build_bundle_dev.yaml b/.github/workflows/build_bundle_dev.yaml index 0adac3e9..4b16631d 100644 --- a/.github/workflows/build_bundle_dev.yaml +++ b/.github/workflows/build_bundle_dev.yaml @@ -27,21 +27,21 @@ jobs: branch: dev prefix: rpi- latest: yes - # - core_os: ubuntu20.04 - # ffmpeg: "6.1.1-vaapi" - # ffmpeg_os: ubuntu20.04 - # platforms: linux/amd64 - # branch: dev - # prefix: vaapi- - # latest: yes - # - core_os: ubuntu20.04 - # ffmpeg: "6.1.1-cuda" - # ffmpeg_os: ubuntu20.04 - # ffmpeg_tags: "-cuda11.7.1" - # platforms: linux/amd64 - # branch: dev - # prefix: cuda- - # latest: yes + - core_os: ubuntu20.04 + ffmpeg: "6.1.1-vaapi" + ffmpeg_os: ubuntu20.04 + platforms: linux/amd64 + branch: dev + prefix: vaapi- + latest: yes + - core_os: ubuntu20.04 + ffmpeg: "6.1.1-cuda" + ffmpeg_os: ubuntu20.04 + ffmpeg_tags: "-cuda11.7.1" + platforms: linux/amd64 + branch: dev + prefix: cuda- + latest: yes steps: - name: Checkout @@ -68,14 +68,6 @@ jobs: id: buildx uses: docker/setup-buildx-action@master - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Login to DockerHub if: github.event_name != 'pull_request' uses: docker/login-action@v3 @@ -96,5 +88,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new From 819aafda295ddd995d11d87db835656a8ecc1ba9 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:22:51 +0100 Subject: [PATCH 28/29] Reset layer cache experiments --- .github/workflows/build_base_vod.yaml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_base_vod.yaml b/.github/workflows/build_base_vod.yaml index 87e9b024..66236eda 100644 --- a/.github/workflows/build_base_vod.yaml +++ b/.github/workflows/build_base_vod.yaml @@ -7,9 +7,6 @@ on: branches: - vod -env: - cachedir: /tmp/.buildx-cache-core-vod - jobs: docker: runs-on: [self-hosted] @@ -56,8 +53,10 @@ jobs: - name: Cache Docker layers uses: actions/cache@v4 with: - path: ${{ env.cachedir }}-${{ matrix.key }} - key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.key }} + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Login to DockerHub if: github.event_name != 'pull_request' @@ -79,12 +78,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=${{ env.cachedir }}-${{ matrix.key }} - cache-to: type=local,dest=${{ env.cachedir }}-${{ matrix.key }}-new,mode=max - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - name: Move cache - run: | - rm -rf ${{ env.cachedir }}-${{ matrix.key }} - mv ${{ env.cachedir }}-${{ matrix.key }}-new ${{ env.cachedir }}-${{ matrix.key }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new From 9edd24b38a429e400874078b9861b63f747214a2 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Feb 2024 21:27:19 +0100 Subject: [PATCH 29/29] Update action versions --- .github/workflows/build_base.yaml | 4 ++-- .github/workflows/build_base_dev.yaml | 4 ++-- .github/workflows/build_bundle_dev.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 542b951e..1a03d9cb 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -30,13 +30,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | datarhei/base diff --git a/.github/workflows/build_base_dev.yaml b/.github/workflows/build_base_dev.yaml index 6465c721..12d88511 100644 --- a/.github/workflows/build_base_dev.yaml +++ b/.github/workflows/build_base_dev.yaml @@ -26,13 +26,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | datarhei/base diff --git a/.github/workflows/build_bundle_dev.yaml b/.github/workflows/build_bundle_dev.yaml index 4b16631d..f3dde3e3 100644 --- a/.github/workflows/build_bundle_dev.yaml +++ b/.github/workflows/build_bundle_dev.yaml @@ -45,13 +45,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | datarhei/core