From 29afc9e1722d1b5fcfb561d525c56ef490f6790c Mon Sep 17 00:00:00 2001 From: Nicolai Otto <19413840+scenarnick@users.noreply.github.com> Date: Thu, 28 May 2026 11:31:01 +0200 Subject: [PATCH 01/10] Adding docker publishing workflow --- .github/workflows/publish-image.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish-image.yml diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml new file mode 100644 index 00000000..4b0ab341 --- /dev/null +++ b/.github/workflows/publish-image.yml @@ -0,0 +1,35 @@ +name: Build and publish image + +on: + push: + branches: ['main'] + workflow_dispatch: # allows manual runs from the Actions tab + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + +steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest From 68bf37f3984f47f4315bf07cefe2ccf33bf2cdf8 Mon Sep 17 00:00:00 2001 From: Nicolai Otto <19413840+scenarnick@users.noreply.github.com> Date: Thu, 28 May 2026 11:38:26 +0200 Subject: [PATCH 02/10] Refactor steps in publish-image.yml workflow --- .github/workflows/publish-image.yml | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 4b0ab341..f514bf80 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -16,20 +16,20 @@ jobs: contents: read packages: write -steps: - - name: Checkout - uses: actions/checkout@v4 + steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Log in to GHCR - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest From 85b561a5aad6ef2d2034b416c01475a21b2d0877 Mon Sep 17 00:00:00 2001 From: Nicolai Otto <19413840+scenarnick@users.noreply.github.com> Date: Thu, 28 May 2026 11:40:27 +0200 Subject: [PATCH 03/10] Fix indentation in publish-image.yml workflow --- .github/workflows/publish-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index f514bf80..8ec74b34 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -16,7 +16,7 @@ jobs: contents: read packages: write - steps: + steps: - name: Checkout uses: actions/checkout@v4 From 5e9b19881a1bf3fa0eecc75a8068f7aae66c4be4 Mon Sep 17 00:00:00 2001 From: Nicolai Otto <19413840+scenarnick@users.noreply.github.com> Date: Thu, 28 May 2026 11:49:09 +0200 Subject: [PATCH 04/10] Update GitHub Actions workflow for image publishing --- .github/workflows/publish-image.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 8ec74b34..3abd6744 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -1,8 +1,6 @@ name: Build and publish image on: - push: - branches: ['main'] workflow_dispatch: # allows manual runs from the Actions tab env: @@ -18,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Log in to GHCR uses: docker/login-action@v3 From 6ba532fb7a1e4b5479001b30583a675a6268b50e Mon Sep 17 00:00:00 2001 From: Nicolai Otto <19413840+scenarnick@users.noreply.github.com> Date: Thu, 28 May 2026 12:36:17 +0200 Subject: [PATCH 05/10] Update image name and tag in publish workflow --- .github/workflows/publish-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 3abd6744..f7d1ef5a 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -5,7 +5,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: 'bmxtools' jobs: build-and-push: @@ -30,4 +30,4 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:1.7.0 From a576f026980615b2c05fcce0c3647ea512e1c674 Mon Sep 17 00:00:00 2001 From: Nicolai Otto <19413840+scenarnick@users.noreply.github.com> Date: Thu, 28 May 2026 12:42:14 +0200 Subject: [PATCH 06/10] Fix tag syntax in publish-image.yml --- .github/workflows/publish-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index f7d1ef5a..18e7b423 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -30,4 +30,4 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:1.7.0 + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:'1.7.0' From 58e7641f456a32b686227525d4c2cfd13e306893 Mon Sep 17 00:00:00 2001 From: Nicolai Otto Date: Thu, 28 May 2026 13:22:03 +0200 Subject: [PATCH 07/10] Updating release documentation for docker image and fixing typos --- .github/workflows/publish-image.yml | 6 +++--- .gitignore | 1 + docs/release.md | 28 +--------------------------- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 18e7b423..a8477962 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -1,4 +1,4 @@ -name: Build and publish image +name: Build and Publish Image on: workflow_dispatch: # allows manual runs from the Actions tab @@ -26,8 +26,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7.2.0 with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:'1.7.0' + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest diff --git a/.gitignore b/.gitignore index 6fb0d664..d3a1e8dc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ compile_commands.json CTestTestfile.cmake _deps out/ +.DS_Store diff --git a/docs/release.md b/docs/release.md index 6643817d..674b5c2a 100644 --- a/docs/release.md +++ b/docs/release.md @@ -59,30 +59,4 @@ git push origin v${BMX_VERSION} ## Create a Docker Image for the GitHub Container Registry -* Acquire a Linux machine with Docker installed -* Build the `bmxtools` image and tag using the commands below - * `BMX_VERSION` should be set as before; note also the additional `.0` for the patch version. - -```bash -DOCKER_BUILDKIT=1 docker build --platform linux/amd64 -t bmxtools . -docker tag bmxtools ghcr.io/ebu/bmxtools:${BMX_VERSION}.0 -docker tag bmxtools ghcr.io/ebu/bmxtools:latest -``` - -* In your [GitHub settings](https://github.com/settings/tokens) to create tokens - * Select "Generate New Token" and "Generate new token (classic)" - * Change "Expiration" to 7 days - * Select "write:packages" (which will select "read:packages" and all of "repo") - * Select "Generate Token" - * Copy the token which you'll need to pass in when logging into the GitHub Docker registry -* Login into GHCR and push the image using the commands below - * Replace `` with your GitHub username - * Pass in the token when docker login requests it - * `BMX_VERSION` should be set as before; note also the additional `.0` for the patch version - -```bash -docker login ghcr.io --username -docker push ghcr.io/ebu/bmxtools:${BMX_VERSION}.0 -docker push ghcr.io/ebu/bmxtools:latest -docker logout ghcr.io -``` +* Run the [Build and Publish Image](https://github.com/scenarnick/bmx/actions/workflows/publish-image.yml) workflow in GitHub actions on the release tag. From 4912724a5fb457925bd59c33a0d62f5b099e9e4a Mon Sep 17 00:00:00 2001 From: Nicolai Otto Date: Thu, 28 May 2026 13:38:50 +0200 Subject: [PATCH 08/10] Correcting registry name for pushing and updating release document --- .github/workflows/publish-image.yml | 5 +++-- docs/release.md | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index a8477962..f427055b 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -5,7 +5,8 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: 'bmxtools' + TOOL_NAME: 'bmxtools' + VERSION: '1.7.0' jobs: build-and-push: @@ -30,4 +31,4 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL_NAME }}:latest, ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL_NAME }}:"${{ env.VERSION }}" diff --git a/docs/release.md b/docs/release.md index 674b5c2a..747807f3 100644 --- a/docs/release.md +++ b/docs/release.md @@ -9,10 +9,11 @@ This describes the steps for making a release. * Go through the PRs since the last release and add each PR and descriptive text to the `Breaking changes`, `Features`, `Bug fixes` or `Build changes` sections * Update the versions in the 3 main CMakeLists.txt files in the `project` blocks, where `VERSION` has the form `.` * The files are [bmx CMakeLists.txt](../CMakeLists.txt), [libMXF CmakeLists.txt](../deps/libMXF/CMakeLists.txt) and [libMXFpp CmakeLists.txt](../deps/libMXFpp/CMakeLists.txt) -* Run the [Build & Test](https://github.com/ebu/bmx/actions/workflows/build_and_test.yml) workflow in GitHub Actions using the release branch and fix any build errors and warnings +* Update the version in the [Build and Publish Image](../.github/workflows/publish-image.yml) file, where `VERSION` has the form `.`,`` +* Run the [Build & Test](../.github/workflows/build_and_test.yml) workflow in GitHub Actions using the release branch and fix any build errors and warnings * Check the [runner versions](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners) (e.g. `windows-2019` and `macos-13`) in the [release.yml](../.github/workflows/release.yml) workflow file are still available * Select the oldest macOS version available to help with compatibility -* Run the [Release](https://github.com/ebu/bmx/actions/workflows/release.yml) workflow in GitHub Actions using the release branch to check it succeeds +* Run the [Release](../.github/workflows/release.yml) workflow in GitHub Actions using the release branch to check it succeeds * On the release branch, create a temporary tag and then delete the tag once the workflow succeeds: ```bash @@ -43,7 +44,7 @@ git push origin v${BMX_VERSION} ## Create the Release Packages -* Run the [Release](https://github.com/ebu/bmx/actions/workflows/release.yml) workflow in GitHub Actions +* Run the [Release](../.github/workflows/release.yml) workflow in GitHub Actions * Download the Artifacts and extract the individual source and binary zips for the release ## Create a GitHub Release @@ -54,9 +55,9 @@ git push origin v${BMX_VERSION} * Change the CHANGELOG link * Update the zip filenames with the new version * Update the compiler versions used for the binaries - * These can be found in the actions output in the `Win64 binary release` and `MacOS Universal binary release` build steps in the 2 jobs of the [Release](https://github.com/ebu/bmx/actions/workflows/release.yml) workflow in GitHub Actions + * These can be found in the actions output in the `Win64 binary release` and `MacOS Universal binary release` build steps in the 2 jobs of the [Release](../.github/workflows/release.yml) workflow in GitHub Actions * Upload the source and binary zips to the release ## Create a Docker Image for the GitHub Container Registry -* Run the [Build and Publish Image](https://github.com/scenarnick/bmx/actions/workflows/publish-image.yml) workflow in GitHub actions on the release tag. +* Run the [Build and Publish Image](../.github/workflows/publish-image.yml) workflow in GitHub actions on the release tag. From dbc173ad5fedc6ed4f8f100842a84683cff9b3f8 Mon Sep 17 00:00:00 2001 From: Nicolai Otto Date: Thu, 28 May 2026 13:40:52 +0200 Subject: [PATCH 09/10] typos and version updates --- .github/workflows/publish-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index f427055b..8d39945d 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v6.0.2 - name: Log in to GHCR - uses: docker/login-action@v3 + uses: docker/login-action@v4.2.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -31,4 +31,4 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL_NAME }}:latest, ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL_NAME }}:"${{ env.VERSION }}" + tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL_NAME }}:latest, ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL_NAME }}:${{ env.VERSION }} From ee30df201d68a020b75a18de9cd5d67feef7eb89 Mon Sep 17 00:00:00 2001 From: Nicolai Otto Date: Thu, 28 May 2026 13:51:43 +0200 Subject: [PATCH 10/10] Final typo for this round... --- docs/release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release.md b/docs/release.md index 747807f3..e6841a33 100644 --- a/docs/release.md +++ b/docs/release.md @@ -9,7 +9,7 @@ This describes the steps for making a release. * Go through the PRs since the last release and add each PR and descriptive text to the `Breaking changes`, `Features`, `Bug fixes` or `Build changes` sections * Update the versions in the 3 main CMakeLists.txt files in the `project` blocks, where `VERSION` has the form `.` * The files are [bmx CMakeLists.txt](../CMakeLists.txt), [libMXF CmakeLists.txt](../deps/libMXF/CMakeLists.txt) and [libMXFpp CmakeLists.txt](../deps/libMXFpp/CMakeLists.txt) -* Update the version in the [Build and Publish Image](../.github/workflows/publish-image.yml) file, where `VERSION` has the form `.`,`` +* Update the version in the [Build and Publish Image](../.github/workflows/publish-image.yml) file, where `VERSION` has the form `..` * Run the [Build & Test](../.github/workflows/build_and_test.yml) workflow in GitHub Actions using the release branch and fix any build errors and warnings * Check the [runner versions](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners) (e.g. `windows-2019` and `macos-13`) in the [release.yml](../.github/workflows/release.yml) workflow file are still available * Select the oldest macOS version available to help with compatibility