Skip to content

Commit

Permalink
Merge pull request #391 from MrAnno/native-arm64-builder
Browse files Browse the repository at this point in the history
ci: build arm64 image natively without QEMU
  • Loading branch information
alltilla authored Nov 27, 2024
2 parents a2fbad4 + 9bb03d4 commit e654f38
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/axosyslog-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
image-build:
if: github.repository_owner == 'axoflow' || github.event_name != 'schedule'
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform == 'linux/arm64' && 'linux-arm64' || 'ubuntu-latest' }}
needs: prepare

strategy:
Expand All @@ -66,6 +66,19 @@ jobs:
[ "$TYPE" = "stable" ] || [ "$TYPE" = "snapshot" ]
echo "PLATFORM_PAIR=${PLATFORM//\//-}" >> $GITHUB_ENV
# TODO: remove this block once the arm64 runner is available for open-source and has docker pre-installed
if [ "${{ matrix.platform }}" = "linux/arm64" ]; then
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update && sudo apt-get install -y acl docker-ce docker-ce-cli containerd.io docker-buildx-plugin
USERID=$(id -u)
sudo setfacl --modify user:${USERID}:rw /var/run/docker.sock
fi
- name: Checkout source
uses: actions/checkout@v4

Expand Down

0 comments on commit e654f38

Please sign in to comment.