Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/push-digests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ 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"
default: ""

runs:
using: 'composite'
steps:
Expand All @@ -33,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: FhenixProtocol/actions/.github/actions/registry-login@alon.dotan/feature/support_builders
with:
service_account_key: ${{ inputs.service_account_key }}
registry: ${{ inputs.registry }}
Expand All @@ -43,7 +45,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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:

pull_request:
paths:
- '.github/workflows/**'
- '.github/**'

jobs:
build-and-push:
permissions:
contents: read
packages: write
uses: ./.github/workflows/docker_build.yml
uses: FhenixProtocol/actions/.github/workflows/docker_build.yml@alon.dotan/feature/support_builders
with:
registry: 'ghcr.io'
image_name: 'fhenixprotocol/actions/ubuntu'
Expand Down
32 changes: 21 additions & 11 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@ on:
platforms:
required: false
type: string
runs_on:
required: false
type: string
default: '["ubuntu-latest", "ubuntu-latest-arm64"]'
build_args:
required: false
type: string
default: ''
id:
required: false
type: string
default: ''
default: '0'
context:
required: false
type: string
Expand All @@ -41,6 +37,14 @@ on:
required: false
type: string
default: ''
arm_runner:
required: false
type: string
default: 'ubuntu-24.04-arm'
amd64_runner:
required: false
type: string
default: 'ubuntu-24.04'
secrets:
service_account_key:
required: false
Expand All @@ -53,8 +57,13 @@ jobs:
build:
strategy:
matrix:
runs_on: ${{ fromJSON(inputs.runs_on) }}
runs-on: ${{ matrix.runs_on }}
include:
- platform: linux/amd64
runner: ${{ inputs.amd64_runner }}
- platform: linux/arm64
runner: ${{ inputs.arm_runner }}

runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -71,7 +80,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: FhenixProtocol/actions/.github/actions/registry-login@alon.dotan/feature/support_builders
with:
service_account_key: ${{ secrets.service_account_key }}
registry: ${{ inputs.registry }}
Expand All @@ -86,7 +95,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 }}
Expand All @@ -102,17 +111,18 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ matrix.runs_on }}-${{ inputs.id }}-${{ github.job }}
name: digests-${{ env.PLATFORM_PAIR }}-${{ inputs.id }}-${{ github.run_id }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1

merge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Push digests
uses: FhenixProtocol/actions/.github/actions/push-digests@v1.0.5
uses: FhenixProtocol/actions/.github/actions/push-digests@alon.dotan/feature/support_builders
with:
registry: ${{ inputs.registry }}
image_name: "${{ inputs.image_name }}"
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:latest

RUN apt-get update && apt-get install -y lsb-release

RUN lsb_release -a

RUN uname -a
Expand Down