Skip to content

Commit

Permalink
Pass arch to the reusable build flavor workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Oct 18, 2023
1 parent 067a9b7 commit d89c6ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/image-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
base_image: ubuntu:23.04
model: generic
variant: core
arch: amd64
install:
uses: ./.github/workflows/reusable-install-test.yaml
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
base_image: ${{ matrix.baseImage }}
model: ${{ matrix.model }}
variant: ${{ matrix.variant }}
arch: ${{ matrix.arch }}
needs:
- get-core-matrix
strategy:
Expand Down Expand Up @@ -261,6 +262,7 @@ jobs:
base_image: ${{ matrix.baseImage }}
variant: standard
model: generic
arch: amd64
strategy:
fail-fast: false
matrix:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/reusable-build-flavor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
variant:
required: true
type: string
arch:
required: true
type: string

jobs:
build:
Expand Down Expand Up @@ -100,7 +103,7 @@ jobs:
# - Create a reusable worflow that simply calls docker build passing the required build-args
# - Delete the earthly base-image target and force the use of the above workflow anywhere needed
# - Make all remaining earthly targets to use a pre-cooked KAIROS_IMAGE rather than calling +base-image
earthly +ci \
earthly --platform=linux/${{ inputs.arch }} +ci \
--SECURITY_SCANS=false \
--VARIANT=${{ inputs.variant }} \
--FLAVOR=${{ inputs.flavor }} \
Expand All @@ -113,7 +116,7 @@ jobs:
- name: Build master 🔧
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
earthly +ci \
earthly --platform=linux/${{ inputs.arch }} +ci \
--SECURITY_SCANS=false \
--VARIANT=${{ inputs.variant }} \
--FLAVOR=${{ inputs.flavor }} \
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/reusable-build-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
variant:
required: true
type: string
arch:
required: true
type: string

jobs:
build:
Expand Down Expand Up @@ -78,7 +81,7 @@ jobs:
- name: Build PR 🔧
run: |
K3S_VERSION=$(sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version) | unique | last')
earthly +ci \
earthly --platform=linux/${{ inputs.arch }} +ci \
--SECURITY_SCANS=false \
--VARIANT=${{ inputs.variant }} \
--FLAVOR=${{ inputs.flavor }} \
Expand Down

0 comments on commit d89c6ee

Please sign in to comment.