From 72406716ad7be84f04f83b44f4fa16e0e607aa2e Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 13:43:45 +0200 Subject: [PATCH 01/12] Fix --- .github/workflows/Test.yml | 2 +- .github/workflows/docker_build.yml | 2 +- Dockerfile | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 8fe454c..314b2e3 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -5,7 +5,7 @@ on: pull_request: paths: - - '.github/workflows/**' + - '.github/**' jobs: build-and-push: diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 2cfdc35..aa3d898 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -86,7 +86,7 @@ jobs: uses: docker/build-push-action@v5 with: context: ${{ inputs.context }} - platforms: ${{ inputs.runs_on }} + platforms: ${{ inputs.platforms }} file: ${{ inputs.dockerfile }} tags: ${{ inputs.registry }}/${{ inputs.image_name }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 5ade7a1..3d4214c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM ubuntu:latest +RUN apt-get update && apt-get install -y lsb-release + RUN lsb_release -a RUN uname -a From a6f521e33dbd4ba6ece124613018007c560ea26e Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 14:05:46 +0200 Subject: [PATCH 02/12] FIx labels --- .github/workflows/docker_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index aa3d898..191eb62 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -24,7 +24,7 @@ on: runs_on: required: false type: string - default: '["ubuntu-latest", "ubuntu-latest-arm64"]' + default: '["ubuntu-24.04", "ubuntu-24.04-arm"]' build_args: required: false type: string From 199b017ec57ac636d1ea5cc62138344c7017894d Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 14:30:24 +0200 Subject: [PATCH 03/12] Fix id --- .github/actions/push-digests/action.yml | 3 ++- .github/workflows/docker_build.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/push-digests/action.yml b/.github/actions/push-digests/action.yml index a72fad3..ef051b4 100644 --- a/.github/actions/push-digests/action.yml +++ b/.github/actions/push-digests/action.yml @@ -19,6 +19,7 @@ inputs: id: required: false description: "The id of the image to push the digests to" + default: "0" tag: required: false description: "The tag of the image to push the digests to" @@ -43,7 +44,7 @@ runs: uses: actions/download-artifact@v4 with: path: ${{ runner.temp }}/digests - pattern: digests-*-${{ inputs.id }}-${{ github.job }} + pattern: digests-*${{ inputs.id }}-${{ github.run_id }} merge-multiple: true - name: Set tag based on trigger diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 191eb62..69f33a6 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -32,7 +32,7 @@ on: id: required: false type: string - default: '' + default: '0' context: required: false type: string @@ -102,7 +102,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests-${{ matrix.runs_on }}-${{ inputs.id }}-${{ github.job }} + name: digests-${{ matrix.runs_on }}-${{ inputs.id }}-${{ github.run_id }} path: ${{ runner.temp }}/digests/* if-no-files-found: error retention-days: 1 From e3b0c97c9555023161d092e65ebbffc063c758eb Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 14:40:30 +0200 Subject: [PATCH 04/12] WIP --- .github/actions/push-digests/action.yml | 3 ++- .github/workflows/docker_build.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/push-digests/action.yml b/.github/actions/push-digests/action.yml index ef051b4..d0dd239 100644 --- a/.github/actions/push-digests/action.yml +++ b/.github/actions/push-digests/action.yml @@ -24,6 +24,7 @@ inputs: required: false description: "The tag of the image to push the digests to" default: "" + runs: using: 'composite' steps: @@ -44,7 +45,7 @@ runs: uses: actions/download-artifact@v4 with: path: ${{ runner.temp }}/digests - pattern: digests-*${{ inputs.id }}-${{ github.run_id }} + pattern: digests-*${{ inputs.id }} merge-multiple: true - name: Set tag based on trigger diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 69f33a6..e319cdb 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -119,5 +119,5 @@ jobs: service_account_key: ${{ secrets.service_account_key }} docker_registry_token: ${{ secrets.docker_registry_token }} runs_on: "ubuntu-latest" - id: ${{ inputs.id }} + id: ${{ inputs.id }}-${{ github.run_id }} tag: ${{ inputs.tag }} From 8bf0010327a21bc1de2a96fdf3354b86f2480a12 Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 14:51:44 +0200 Subject: [PATCH 05/12] WIP --- .github/actions/push-digests/action.yml | 2 +- .github/workflows/docker_build.yml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/actions/push-digests/action.yml b/.github/actions/push-digests/action.yml index d0dd239..5ccbc7d 100644 --- a/.github/actions/push-digests/action.yml +++ b/.github/actions/push-digests/action.yml @@ -45,7 +45,7 @@ runs: uses: actions/download-artifact@v4 with: path: ${{ runner.temp }}/digests - pattern: digests-*${{ inputs.id }} + pattern: digests-* merge-multiple: true - name: Set tag based on trigger diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index e319cdb..ae1e1ed 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -53,8 +53,13 @@ jobs: build: strategy: matrix: - runs_on: ${{ fromJSON(inputs.runs_on) }} - runs-on: ${{ matrix.runs_on }} + include: + - platform: linux/amd64 + runner: ubuntu-24.04 + - platform: linux/arm64 + runner: ubuntu-24.04-arm + + runs-on: ${{ matrix.runner }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -102,10 +107,11 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests-${{ matrix.runs_on }}-${{ inputs.id }}-${{ github.run_id }} + name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* if-no-files-found: error retention-days: 1 + merge: runs-on: ubuntu-latest needs: From 32049f2d91ea73df912154c2a6fba08dffad9107 Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 14:56:40 +0200 Subject: [PATCH 06/12] WIP --- .github/actions/push-digests/action.yml | 2 +- .github/workflows/docker_build.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/push-digests/action.yml b/.github/actions/push-digests/action.yml index 5ccbc7d..ef351bd 100644 --- a/.github/actions/push-digests/action.yml +++ b/.github/actions/push-digests/action.yml @@ -45,7 +45,7 @@ runs: uses: actions/download-artifact@v4 with: path: ${{ runner.temp }}/digests - pattern: digests-* + pattern: digests-*${{ inputs.id }}* merge-multiple: true - name: Set tag based on trigger diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index ae1e1ed..96bbfbb 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -76,7 +76,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to container registry. if: ${{ inputs.registry == 'ghcr.io' }} - uses: FhenixProtocol/actions/.github/actions/registry-login@v1.0.5 + uses: ./.github/actions/registry-login/action.yml with: service_account_key: ${{ secrets.service_account_key }} registry: ${{ inputs.registry }} @@ -118,12 +118,12 @@ jobs: - build steps: - name: Push digests - uses: FhenixProtocol/actions/.github/actions/push-digests@v1.0.5 + uses: ./.github/actions/push-digests/action.yml with: registry: ${{ inputs.registry }} image_name: "${{ inputs.image_name }}" service_account_key: ${{ secrets.service_account_key }} docker_registry_token: ${{ secrets.docker_registry_token }} runs_on: "ubuntu-latest" - id: ${{ inputs.id }}-${{ github.run_id }} + id: ${{ inputs.id }} tag: ${{ inputs.tag }} From fa5ad7165507a03a493c79c2859935f4860140ce Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 15:03:00 +0200 Subject: [PATCH 07/12] wip --- .github/actions/push-digests/action.yml | 2 +- .github/workflows/Test.yml | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/actions/push-digests/action.yml b/.github/actions/push-digests/action.yml index ef351bd..4d5eff5 100644 --- a/.github/actions/push-digests/action.yml +++ b/.github/actions/push-digests/action.yml @@ -35,7 +35,7 @@ runs: - name: Log in to container registry. if: ${{ inputs.registry == 'ghcr.io' }} - uses: FhenixProtocol/actions/.github/actions/registry-login@v1.0.5 + uses: ./.github/actions/registry-login/action.yml with: service_account_key: ${{ inputs.service_account_key }} registry: ${{ inputs.registry }} diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 314b2e3..8158206 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -9,11 +9,19 @@ on: jobs: build-and-push: + runs-on: ubuntu-latest permissions: contents: read packages: write - uses: ./.github/workflows/docker_build.yml - with: - registry: 'ghcr.io' - image_name: 'fhenixprotocol/actions/ubuntu' - id: 'ubuntu' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + token: ${{ secrets.git_submodule_token || github.token }} + - name: Build + uses: ./.github/workflows/docker_build.yml + with: + registry: 'ghcr.io' + image_name: 'fhenixprotocol/actions/ubuntu' + id: 'ubuntu' From d7314d30bdf90ade07cf667270104440c875c107 Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 16:08:39 +0200 Subject: [PATCH 08/12] Test --- .github/actions/push-digests/action.yml | 4 ++-- .github/workflows/Test.yml | 18 +++++------------- .github/workflows/docker_build.yml | 6 +++--- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/actions/push-digests/action.yml b/.github/actions/push-digests/action.yml index 4d5eff5..229b11b 100644 --- a/.github/actions/push-digests/action.yml +++ b/.github/actions/push-digests/action.yml @@ -35,7 +35,7 @@ runs: - name: Log in to container registry. if: ${{ inputs.registry == 'ghcr.io' }} - uses: ./.github/actions/registry-login/action.yml + uses: FhenixProtocol/actions/.github/actions/registry-login@alon.dotan/feature/support_builders with: service_account_key: ${{ inputs.service_account_key }} registry: ${{ inputs.registry }} @@ -45,7 +45,7 @@ runs: uses: actions/download-artifact@v4 with: path: ${{ runner.temp }}/digests - pattern: digests-*${{ inputs.id }}* + pattern: digests*${{ inputs.id }}*${{ github.run_id }} merge-multiple: true - name: Set tag based on trigger diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 8158206..fd252e2 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -9,19 +9,11 @@ on: jobs: build-and-push: - runs-on: ubuntu-latest permissions: contents: read packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - token: ${{ secrets.git_submodule_token || github.token }} - - name: Build - uses: ./.github/workflows/docker_build.yml - with: - registry: 'ghcr.io' - image_name: 'fhenixprotocol/actions/ubuntu' - id: 'ubuntu' + uses: FhenixProtocol/actions/.github/workflows/docker_build.yml@alon.dotan/feature/support_builders + with: + registry: 'ghcr.io' + image_name: 'fhenixprotocol/actions/ubuntu' + id: 'ubuntu' diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 96bbfbb..fc81f3c 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -76,7 +76,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to container registry. if: ${{ inputs.registry == 'ghcr.io' }} - uses: ./.github/actions/registry-login/action.yml + uses: FhenixProtocol/actions/.github/actions/registry-login@alon.dotan/feature/support_builders with: service_account_key: ${{ secrets.service_account_key }} registry: ${{ inputs.registry }} @@ -107,7 +107,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests-${{ env.PLATFORM_PAIR }} + name: digests-${{ env.PLATFORM_PAIR }}-${{ inputs.id }}-${{ github.run_id }} path: ${{ runner.temp }}/digests/* if-no-files-found: error retention-days: 1 @@ -118,7 +118,7 @@ jobs: - build steps: - name: Push digests - uses: ./.github/actions/push-digests/action.yml + uses: FhenixProtocol/actions/.github/actions/push-digests@alon.dotan/feature/support_builders with: registry: ${{ inputs.registry }} image_name: "${{ inputs.image_name }}" From b04f720a3ccee9971923e18c3471b9ba24fe1670 Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 16:32:37 +0200 Subject: [PATCH 09/12] Dynamix metrics --- .github/workflows/docker_build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index fc81f3c..d319ebe 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -24,7 +24,7 @@ on: runs_on: required: false type: string - default: '["ubuntu-24.04", "ubuntu-24.04-arm"]' + default: "[{\"platforms\": \"linux/amd64\", \"runner\": \"ubuntu-24.04\"}, {\"platforms\": \"linux/arm64\", \"runner\": \"ubuntu-24.04-arm\"}]" build_args: required: false type: string @@ -52,12 +52,7 @@ on: jobs: build: strategy: - matrix: - include: - - platform: linux/amd64 - runner: ubuntu-24.04 - - platform: linux/arm64 - runner: ubuntu-24.04-arm + matrix: ${{ fromJSON(inputs.runs_on) }} runs-on: ${{ matrix.runner }} steps: From cf4b0a8261915818f9eb595056c28936fe58b76b Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 16:41:02 +0200 Subject: [PATCH 10/12] Take 2 --- .github/workflows/docker_build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index d319ebe..ab40cc6 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -21,10 +21,6 @@ on: platforms: required: false type: string - runs_on: - required: false - type: string - default: "[{\"platforms\": \"linux/amd64\", \"runner\": \"ubuntu-24.04\"}, {\"platforms\": \"linux/arm64\", \"runner\": \"ubuntu-24.04-arm\"}]" build_args: required: false type: string @@ -41,6 +37,10 @@ on: required: false type: string default: '' + runners_mapping: + required: false + type: string + default: '{"linux/amd64": "ubuntu-24.04", "linux/arm64": "ubuntu-24.04-arm"}' secrets: service_account_key: required: false @@ -52,7 +52,12 @@ on: jobs: build: strategy: - matrix: ${{ fromJSON(inputs.runs_on) }} + matrix: + include: + - platform: linux/amd64 + runner: fromJSON(${{ inputs.runners_mapping }})["linux/amd64"] + - platform: linux/arm64 + runner: fromJSON(${{ inputs.runners_mapping }})["linux/amd64"] runs-on: ${{ matrix.runner }} steps: From 53065248d5b15eea77d4dff80d0218c3b80375b8 Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 16:46:44 +0200 Subject: [PATCH 11/12] Take 3 --- .github/workflows/docker_build.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index ab40cc6..0f90768 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -37,10 +37,18 @@ on: required: false type: string default: '' - runners_mapping: + # runners_mapping: + # required: false + # type: string + # default: '{"linux/amd64": "ubuntu-24.04", "linux/arm64": "ubuntu-24.04-arm"}' + arm_runner: required: false type: string - default: '{"linux/amd64": "ubuntu-24.04", "linux/arm64": "ubuntu-24.04-arm"}' + default: 'ubuntu-24.04-arm' + amd64_runner: + required: false + type: string + default: 'ubuntu-24.04' secrets: service_account_key: required: false @@ -55,9 +63,9 @@ jobs: matrix: include: - platform: linux/amd64 - runner: fromJSON(${{ inputs.runners_mapping }})["linux/amd64"] + runner: ${{ inputs.amd64_runner }} - platform: linux/arm64 - runner: fromJSON(${{ inputs.runners_mapping }})["linux/amd64"] + runner: ${{ inputs.arm_runner }} runs-on: ${{ matrix.runner }} steps: From 12f9c1ff5f1689ce2edcd5838e497e29db675a18 Mon Sep 17 00:00:00 2001 From: Alon Dotan Date: Sun, 28 Dec 2025 16:51:07 +0200 Subject: [PATCH 12/12] Cleanup --- .github/workflows/docker_build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 0f90768..4c0525d 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -37,10 +37,6 @@ on: required: false type: string default: '' - # runners_mapping: - # required: false - # type: string - # default: '{"linux/amd64": "ubuntu-24.04", "linux/arm64": "ubuntu-24.04-arm"}' arm_runner: required: false type: string