Skip to content

Commit 3306be3

Browse files
committed
multi arch tools
1 parent f304a05 commit 3306be3

2 files changed

Lines changed: 23 additions & 14 deletions

File tree

.github/workflows/build_all_images.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ jobs:
4040
# as it uses a 3rd party docker image with github cli installed to verify attestation of tflint binary
4141
# and we dont want to make a high scoped token available to that image
4242
# token needs attestation read so it can verify attestation of tflint binary
43-
runs-on: ubuntu-22.04
43+
name: Build tool images for on ${{ matrix.arch }}
44+
runs-on: '${{ matrix.runner }}'
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
include:
49+
- arch: amd64
50+
runner: ubuntu-22.04
51+
- arch: arm64
52+
runner: ubuntu-22.04-arm
4453
permissions:
4554
contents: read
4655
attestations: read
@@ -73,7 +82,7 @@ jobs:
7382
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
7483
name: Upload docker images
7584
with:
76-
name: docker_artifact
85+
name: docker_artifact_${{ matrix.arch }}
7786
path: |
7887
grype_image.tar
7988
syft_image.tar

.github/workflows/build_multi_arch_image.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ jobs:
4646
df -h
4747
echo "Freeing up disk space for docker build..."
4848
49-
rm -rf /usr/local/lib/android || true
50-
rm -rf /opt/android || true
51-
rm -rf /usr/local/android-sdk || true
52-
rm -rf /home/runner/Android || true
49+
sudo rm -rf /usr/local/lib/android || true
50+
sudo rm -rf /opt/android || true
51+
sudo rm -rf /usr/local/android-sdk || true
52+
sudo rm -rf /home/runner/Android || true
5353
5454
# Remove Android packages if they exist
5555
ANDROID_PACKAGES=$(dpkg -l | grep -E "^ii.*(android|adb)" | awk '{print $2}' | tr '\n' ' ' || true)
@@ -65,11 +65,11 @@ jobs:
6565
df -h
6666
echo "Freeing up disk space for docker build..."
6767
68-
rm -rf /opt/ghc || true
69-
rm -rf /usr/local/.ghcup || true
70-
rm -rf /opt/cabal || true
71-
rm -rf /home/runner/.ghcup || true
72-
rm -rf /home/runner/.cabal || true
68+
sudo rm -rf /opt/ghc || true
69+
sudo rm -rf /usr/local/.ghcup || true
70+
sudo rm -rf /opt/cabal || true
71+
sudo rm -rf /home/runner/.ghcup || true
72+
sudo rm -rf /home/runner/.cabal || true
7373
7474
# Remove Haskell packages if they exist
7575
HASKELL_PACKAGES=$(dpkg -l | grep -E "^ii.*(ghc|haskell|cabal)" | awk '{print $2}' | tr '\n' ' ' || true)
@@ -87,10 +87,10 @@ jobs:
8787
echo "Freeing up disk space for docker build..."
8888
8989
# Remove .NET installation directories
90-
rm -rf /usr/share/dotnet || true
90+
sudo rm -rf /usr/share/dotnet || true
9191
9292
# Remove .NET documentation directories
93-
rm -rf /usr/share/doc/dotnet-* || true
93+
sudo rm -rf /usr/share/doc/dotnet-* || true
9494
9595
# Remove .NET packages if they exist
9696
DOTNET_PACKAGES=$(dpkg -l | grep -E "^ii.*dotnet" | awk '{print $2}' | tr '\n' ' ' || true)
@@ -137,7 +137,7 @@ jobs:
137137
- name: docker_artifact download
138138
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
139139
with:
140-
name: docker_artifact
140+
name: docker_artifact_${{ matrix.arch }}
141141
path: images/
142142
- name: extract docker images
143143
run: |

0 commit comments

Comments
 (0)