Skip to content

Commit

Permalink
fix(ci): properly pass TARGET_ARCH as build-arg to docker.
Browse files Browse the repository at this point in the history
It gets automatically defined in buildx.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP authored and poiana committed May 19, 2023
1 parent e47ece4 commit a28347d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/reusable_build_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
build-docker:
# See https://github.com/actions/runner/issues/409#issuecomment-1158849936
runs-on: ${{ (inputs.arch == 'aarch64' && fromJSON('[ "self-hosted", "linux", "ARM64" ]')) || 'ubuntu-latest' }}
env:
TARGET_ARCH: ${{ (inputs.arch == 'aarch64' && 'arm64') || 'amd64' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -41,6 +43,7 @@ jobs:
docker build -t docker.io/falcosecurity/falco-no-driver:${{ inputs.arch }}-${{ inputs.tag }} \
--build-arg VERSION_BUCKET=bin${{ inputs.bucket_suffix }} \
--build-arg FALCO_VERSION=${{ inputs.version }} \
--build-arg TARGET_ARCH=${TARGET_ARCH} \
--output type=docker,dest=/tmp/falco-no-driver-${{ inputs.arch }}.tar \
.
Expand All @@ -50,6 +53,7 @@ jobs:
docker build -t docker.io/falcosecurity/falco:${{ inputs.arch }}-${{ inputs.tag }} \
--build-arg VERSION_BUCKET=deb${{ inputs.bucket_suffix }} \
--build-arg FALCO_VERSION=${{ inputs.version }} \
--build-arg TARGET_ARCH=${TARGET_ARCH} \
--output type=docker,dest=/tmp/falco-${{ inputs.arch }}.tar \
.
Expand All @@ -63,6 +67,7 @@ jobs:
cd ${{ github.workspace }}/docker/driver-loader/
docker build -t docker.io/falcosecurity/falco-driver-loader:${{ inputs.arch }}-${{ inputs.tag }} \
--build-arg FALCO_IMAGE_TAG=${{ inputs.arch }}-${{ inputs.tag }} \
--build-arg TARGET_ARCH=${TARGET_ARCH} \
--output type=docker,dest=/tmp/falco-driver-loader-${{ inputs.arch }}.tar \
.
Expand Down

0 comments on commit a28347d

Please sign in to comment.