Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: build arm64 image natively without QEMU #391

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
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
Loading