mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 03:13:15 +00:00
Deprecated action `crazy-max/setup-buildx-action@v1` has been replaced with: `docker/setup-qemu-action@v1` `docker/setup-buildx-action@v1` `docker/login-action@v1` `docker/build-push-action@v2` See: https://github.com/crazy-max/ghaction-docker-buildx
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
on:
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
paths:
|
|
- 'runner/**'
|
|
- .github/workflows/build-runner.yml
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- runner/patched/*
|
|
- runner/Dockerfile
|
|
- runner/dindrunner.Dockerfile
|
|
- runner/entrypoint.sh
|
|
- .github/workflows/build-runner.yml
|
|
name: Runner
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
name: Build ${{ matrix.name }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: actions-runner
|
|
dockerfile: Dockerfile
|
|
- name: actions-runner-dind
|
|
dockerfile: dindrunner.Dockerfile
|
|
env:
|
|
RUNNER_VERSION: 2.274.2
|
|
DOCKER_VERSION: 19.03.12
|
|
DOCKERHUB_USERNAME: ${{ github.repository_owner }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
version: latest
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
if: ${{ github.event_name == 'push' }}
|
|
with:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
|
|
- name: Build [and Push]
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: ./runner
|
|
file: ./runner/${{ matrix.dockerfile }}
|
|
platforms: linux/amd64,linux/arm64
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
build-args: |
|
|
RUNNER_VERSION=${{ env.RUNNER_VERSION }}
|
|
DOCKER_VERSION=${{ env.DOCKER_VERSION }}
|
|
tags: |
|
|
${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:v${{ env.RUNNER_VERSION }}
|
|
${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:latest
|