Skip to content

Commit

Permalink
add runner platform
Browse files Browse the repository at this point in the history
  • Loading branch information
romnovi committed Jan 1, 2025
1 parent 2830d67 commit 45972fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
permissions:
contents: read
packages: write
strategy:
matrix:
platform: [linux/amd64]
include:
- platform: linux/amd64
runner_platform: linux-amd64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -33,5 +39,6 @@ jobs:
file: ./src/Dockerfile
push: true
tags: ghcr.io/mystdeim/github-runner:${{ github.run_number }}
platforms: ${{ matrix.platform }}
build-args: |
BUILD_NUMBER=${{ github.run_number }}
RUNNER_PLATFORM=${{ matrix.runner_platform }}
7 changes: 4 additions & 3 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM debian:stable-slim

ARG RUNNER_PLATFORM=""
ARG RUNNER_VERSION="2.321.0"
ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -26,10 +27,10 @@ RUN apt-get update && apt-get install -y docker-ce-cli

# Set up the actions runner
RUN cd /home/docker && mkdir actions-runner && cd actions-runner \
&& curl -o actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz \
&& tar xzf actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz
&& curl -o actions-runner-${RUNNER_PLATFORM}-${RUNNER_VERSION}.tar.gz -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-${RUNNER_PLATFORM}-${RUNNER_VERSION}.tar.gz \
&& tar xzf actions-runner-${RUNNER_PLATFORM}-${RUNNER_VERSION}.tar.gz

RUN rm /home/docker/actions-runner/actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz
RUN rm /home/docker/actions-runner/actions-runner-${RUNNER_PLATFORM}-${RUNNER_VERSION}.tar.gz

# Change ownership to docker user and install dependencies
RUN chown -R docker /home/docker && /home/docker/actions-runner/bin/installdependencies.sh
Expand Down

0 comments on commit 45972fe

Please sign in to comment.