From 286fb36e9c5a8ac7d5c6c5c4bdf579605560fb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:38:37 +0330 Subject: [PATCH 01/11] feat: push docker image to ghcr --- .github/workflows/deploy_image.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/deploy_image.yml diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml new file mode 100644 index 000000000..f62cce90d --- /dev/null +++ b/.github/workflows/deploy_image.yml @@ -0,0 +1,54 @@ +name: Deploy Jumble Container Image + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' # Only build on tag with semantic versioning format + workflow_dispatch: + +jobs: + push_avestruz_image: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Script for setting the version without the leading 'v' + - name: Set Versions + uses: actions/github-script@v7 + id: set_version + with: + script: | + // Get the tag + const tag = context.ref.substring(10) + // Replace the tag with one without v + const no_v = tag.replace('v', '') + // Looks for a dash + const dash_index = no_v.lastIndexOf('-') + // If any, removes it, otherwise return the value unchanged + const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v + // Set the tag, no-v and no-dash as output variables + core.setOutput('tag', tag) + core.setOutput('no-v', no_v) + core.setOutput('no-dash', no_dash) + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ghcr.io/${{ github.actor }}/jumble:latest, ghcr.io/${{ github.actor }}/jumble:${{steps.set_version.outputs.no-dash}} + - name: Release + uses: softprops/action-gh-release@v1 From e7a253518f7063883e019c1104572b80177c6593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:01:02 +0330 Subject: [PATCH 02/11] fix: ghcr repo name should be lowercase --- .github/workflows/deploy_image.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index f62cce90d..b3adc6827 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -18,9 +18,9 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 # Script for setting the version without the leading 'v' - - name: Set Versions + - name: Set Variables uses: actions/github-script@v7 - id: set_version + id: set_variables with: script: | // Get the tag @@ -33,8 +33,13 @@ jobs: const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v // Set the tag, no-v and no-dash as output variables core.setOutput('tag', tag) - core.setOutput('no-v', no_v) - core.setOutput('no-dash', no_dash) + core.setOutput('tag-no-v', no_v) + core.setOutput('tag-no-dash', no_dash) + // convert everything to lowercase because ghcr repository name must be lowercase + const actor = context.actor.toLowerCase(); + const repository = context.repo.toLowerCase(); + core.setOutput('actor', actor); + core.setOutput('repository', repository); - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry @@ -49,6 +54,8 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: ghcr.io/${{ github.actor }}/jumble:latest, ghcr.io/${{ github.actor }}/jumble:${{steps.set_version.outputs.no-dash}} + tags: | + ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:latest + ghcr.io/${{ steps.set_variables.outputs.username }}/${{ steps.set_variables.outputs.repository }}:${{steps.set_variables.outputs.tag-no-dash}} - name: Release uses: softprops/action-gh-release@v1 From 5a7a942ea32368364d13ad76b7cf4b2b755ea586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:04:25 +0330 Subject: [PATCH 03/11] fix: ci --- .github/workflows/deploy_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index b3adc6827..439ada0d6 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -37,7 +37,7 @@ jobs: core.setOutput('tag-no-dash', no_dash) // convert everything to lowercase because ghcr repository name must be lowercase const actor = context.actor.toLowerCase(); - const repository = context.repo.toLowerCase(); + const repository = context.repo.repo.toLowerCase(); core.setOutput('actor', actor); core.setOutput('repository', repository); - name: Set up Docker Buildx From 2540d6f12cf2f2388be8a5ea9c3108605de63f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:08:56 +0330 Subject: [PATCH 04/11] fix: ci --- .github/workflows/deploy_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 439ada0d6..632d41ce3 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -56,6 +56,6 @@ jobs: push: true tags: | ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:latest - ghcr.io/${{ steps.set_variables.outputs.username }}/${{ steps.set_variables.outputs.repository }}:${{steps.set_variables.outputs.tag-no-dash}} + ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:${{steps.set_variables.outputs.tag-no-dash}} - name: Release uses: softprops/action-gh-release@v1 From 4d303fa20e703294dc389d6430a4fba8753a577d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:23:01 +0330 Subject: [PATCH 05/11] fix: ci --- .github/workflows/deploy_image.yml | 74 +++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 632d41ce3..6c947c6c3 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -1,9 +1,8 @@ name: Deploy Jumble Container Image - on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' # Only build on tag with semantic versioning format + - 'v[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: jobs: @@ -15,39 +14,77 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-tags: true # Crucial: Ensures git history includes tags + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - # Script for setting the version without the leading 'v' + - name: Set Variables uses: actions/github-script@v7 id: set_variables with: script: | - // Get the tag - const tag = context.ref.substring(10) - // Replace the tag with one without v - const no_v = tag.replace('v', '') - // Looks for a dash - const dash_index = no_v.lastIndexOf('-') - // If any, removes it, otherwise return the value unchanged - const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v - // Set the tag, no-v and no-dash as output variables - core.setOutput('tag', tag) - core.setOutput('tag-no-v', no_v) - core.setOutput('tag-no-dash', no_dash) - // convert everything to lowercase because ghcr repository name must be lowercase + const exec = require('@actions/exec'); + let tag = ''; + + // Check if triggered by a tag push + if (context.eventName === 'push' && context.ref.startsWith('refs/tags/')) { + tag = context.ref.replace('refs/tags/', ''); + } + // If manual dispatch, fetch the latest tag from git history + else if (context.eventName === 'workflow_dispatch') { + let output = ''; + const options = { + listeners: { + stdout: (data) => { output += data.toString(); } + } + }; + // Get the most recent tag sorted by version + await exec.exec('git', ['tag', '--sort=-version:refname', '|', 'head', '-n', '1'], { + shell: '/bin/bash', + listeners: { + stdout: (data) => { output += data.toString(); } + } + }); + tag = output.trim(); + + if (!tag) { + core.setFailed('No tags found in repository for workflow_dispatch'); + return; + } + console.log(`Found latest tag for dispatch: ${tag}`); + } else { + core.setFailed(`Unsupported event or ref: ${context.eventName} / ${context.ref}`); + return; + } + + // Process the tag (remove 'v', remove suffix after dash) + const no_v = tag.replace('v', ''); + const dash_index = no_v.lastIndexOf('-'); + const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v; + + // Set outputs + core.setOutput('tag', tag); + core.setOutput('tag-no-v', no_v); + core.setOutput('tag-no-dash', no_dash); + + // Lowercase for GHCR const actor = context.actor.toLowerCase(); const repository = context.repo.repo.toLowerCase(); core.setOutput('actor', actor); core.setOutput('repository', repository); + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push uses: docker/build-push-action@v5 with: @@ -56,6 +93,9 @@ jobs: push: true tags: | ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:latest - ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:${{steps.set_variables.outputs.tag-no-dash}} + ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:${{ steps.set_variables.outputs.tag-no-dash }} + - name: Release + # Only create a release on tag push, not on manual dispatch + if: github.event_name == 'push' uses: softprops/action-gh-release@v1 From f9b101ef5cf4ba3b4ad2b6d53f033cbde7f220dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:26:01 +0330 Subject: [PATCH 06/11] fix: ci --- .github/workflows/deploy_image.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 6c947c6c3..8b6b7b9c4 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -25,7 +25,6 @@ jobs: id: set_variables with: script: | - const exec = require('@actions/exec'); let tag = ''; // Check if triggered by a tag push From 9d75af729c6e6938727fedca4859425f77c1ce9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:29:58 +0330 Subject: [PATCH 07/11] fix: ci --- .github/workflows/deploy_image.yml | 62 ++---------------------------- 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 8b6b7b9c4..e7b5b881e 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -2,9 +2,8 @@ name: Deploy Jumble Container Image on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+' # Only build on tag with semantic versioning format workflow_dispatch: - jobs: push_avestruz_image: runs-on: ubuntu-latest @@ -14,76 +13,27 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-tags: true # Crucial: Ensures git history includes tags - - name: Set up QEMU uses: docker/setup-qemu-action@v3 - + # Script for setting the version without the leading 'v' - name: Set Variables uses: actions/github-script@v7 id: set_variables with: script: | - let tag = ''; - - // Check if triggered by a tag push - if (context.eventName === 'push' && context.ref.startsWith('refs/tags/')) { - tag = context.ref.replace('refs/tags/', ''); - } - // If manual dispatch, fetch the latest tag from git history - else if (context.eventName === 'workflow_dispatch') { - let output = ''; - const options = { - listeners: { - stdout: (data) => { output += data.toString(); } - } - }; - // Get the most recent tag sorted by version - await exec.exec('git', ['tag', '--sort=-version:refname', '|', 'head', '-n', '1'], { - shell: '/bin/bash', - listeners: { - stdout: (data) => { output += data.toString(); } - } - }); - tag = output.trim(); - - if (!tag) { - core.setFailed('No tags found in repository for workflow_dispatch'); - return; - } - console.log(`Found latest tag for dispatch: ${tag}`); - } else { - core.setFailed(`Unsupported event or ref: ${context.eventName} / ${context.ref}`); - return; - } - - // Process the tag (remove 'v', remove suffix after dash) - const no_v = tag.replace('v', ''); - const dash_index = no_v.lastIndexOf('-'); - const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v; - - // Set outputs - core.setOutput('tag', tag); - core.setOutput('tag-no-v', no_v); - core.setOutput('tag-no-dash', no_dash); - - // Lowercase for GHCR + // convert everything to lowercase because ghcr repository name must be lowercase const actor = context.actor.toLowerCase(); const repository = context.repo.repo.toLowerCase(); core.setOutput('actor', actor); core.setOutput('repository', repository); - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push uses: docker/build-push-action@v5 with: @@ -92,9 +42,5 @@ jobs: push: true tags: | ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:latest - ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:${{ steps.set_variables.outputs.tag-no-dash }} - - name: Release - # Only create a release on tag push, not on manual dispatch - if: github.event_name == 'push' - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v1 From c12fd2d0788c6a7fa2c6e21990035217f4428703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:31:43 +0330 Subject: [PATCH 08/11] fix: ci --- .github/workflows/deploy_image.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index e7b5b881e..67731b435 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -1,8 +1,9 @@ name: Deploy Jumble Container Image on: push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' # Only build on tag with semantic versioning format + # tags: + # - 'v[0-9]+.[0-9]+.[0-9]+' # Only build on tag with semantic versioning format + branches: [master] workflow_dispatch: jobs: push_avestruz_image: From d1d1bb802291860d9e82fd2393e9329e69be050d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:41:32 +0330 Subject: [PATCH 09/11] fix: ci --- .github/workflows/deploy_image.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 67731b435..85dc5101b 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -5,6 +5,11 @@ on: # - 'v[0-9]+.[0-9]+.[0-9]+' # Only build on tag with semantic versioning format branches: [master] workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: push_avestruz_image: runs-on: ubuntu-latest @@ -43,5 +48,5 @@ jobs: push: true tags: | ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:latest - - name: Release - uses: softprops/action-gh-release@v1 + # - name: Release + # uses: softprops/action-gh-release@v1 From 3a393097b727aac478ce94164a9cb5c91e0390be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:34:11 +0330 Subject: [PATCH 10/11] feat: ci better docker metadata tagging --- .github/workflows/deploy_image.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 85dc5101b..61b374e2c 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -6,6 +6,10 @@ on: branches: [master] workflow_dispatch: +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -19,9 +23,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - # Script for setting the version without the leading 'v' + - name: Set Variables uses: actions/github-script@v7 id: set_variables @@ -32,21 +37,30 @@ jobs: const repository = context.repo.repo.toLowerCase(); core.setOutput('actor', actor); core.setOutput('repository', repository); + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v6 + with: + images: ${{ env.REGISTRY }}/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }} + - name: Build and push uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 push: true - tags: | - ghcr.io/${{ steps.set_variables.outputs.actor }}/${{ steps.set_variables.outputs.repository }}:latest - # - name: Release - # uses: softprops/action-gh-release@v1 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max From 070b0a47d8e9e61436500e4aa960d42b35570fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AleeRezaa=E2=80=A2?= <61104127+AleeRezaa@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:50:51 +0330 Subject: [PATCH 11/11] refactor: rename github workflow --- .github/workflows/deploy_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_image.yml b/.github/workflows/deploy_image.yml index 61b374e2c..7dffa9740 100644 --- a/.github/workflows/deploy_image.yml +++ b/.github/workflows/deploy_image.yml @@ -15,7 +15,7 @@ concurrency: cancel-in-progress: true jobs: - push_avestruz_image: + push_image: runs-on: ubuntu-latest permissions: contents: write