From ff2b01c92c9c53088892a378bb9080104bc13383 Mon Sep 17 00:00:00 2001 From: Rongxin Liu Date: Mon, 28 Oct 2024 13:42:03 -0700 Subject: [PATCH] use ubuntu 24.04 action runners --- .github/workflows/main.yml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85ac6f0..49fe26e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ on: - workflow_dispatch jobs: build-amd64: - runs-on: ubuntu-latest-64-cores + runs-on: ubuntu-2404-64-cores-amd steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -48,26 +48,8 @@ jobs: docker push cs50/server:canary-amd64 build-arm64: - runs-on: ubuntu-latest-64-cores-arm + runs-on: ubuntu-2404-64-cores-arm steps: - - name: Install Docker (remove once Docker is pre-installed on arm64 runners) - run: | - export DEBIAN_FRONTEND=noninteractive - sudo apt update - sudo apt install -y ca-certificates curl - sudo install -m 0755 -d /etc/apt/keyrings - sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc - sudo chmod a+r /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 update - sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - sudo usermod -aG docker $USER - sudo apt install -y acl - sudo setfacl --modify user:$USER:rw /var/run/docker.sock - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -77,9 +59,10 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Install Python (replace with setup-python once available on arm64 runners) - run: | - sudo apt install -y python3 python3-pip + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Build for linux/arm64 uses: docker/build-push-action@v5