mirror of
https://github.com/actions/runner.git
synced 2025-12-10 04:06:57 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
131 lines
3.2 KiB
YAML
131 lines
3.2 KiB
YAML
name: Runner CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- releases/*
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, win-arm64, osx-x64, osx-arm64 ]
|
|
include:
|
|
- runtime: linux-x64
|
|
os: ubuntu-latest
|
|
devScript: ./dev.sh
|
|
|
|
- runtime: linux-arm64
|
|
os: ubuntu-latest
|
|
devScript: ./dev.sh
|
|
|
|
- runtime: linux-arm
|
|
os: ubuntu-latest
|
|
devScript: ./dev.sh
|
|
|
|
- runtime: osx-x64
|
|
os: macOS-latest
|
|
devScript: ./dev.sh
|
|
|
|
- runtime: osx-arm64
|
|
os: macOS-latest
|
|
devScript: ./dev.sh
|
|
|
|
- runtime: win-x64
|
|
os: windows-latest
|
|
devScript: ./dev
|
|
|
|
- runtime: win-arm64
|
|
os: windows-latest
|
|
devScript: ./dev
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
# Build runner layout
|
|
- name: Build & Layout Release
|
|
run: |
|
|
${{ matrix.devScript }} layout Release ${{ matrix.runtime }}
|
|
working-directory: src
|
|
|
|
# Run tests
|
|
- name: L0
|
|
run: |
|
|
${{ matrix.devScript }} test
|
|
working-directory: src
|
|
if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm' && matrix.runtime != 'osx-arm64' && matrix.runtime != 'win-arm64'
|
|
|
|
# Create runner package tar.gz/zip
|
|
- name: Package Release
|
|
if: github.event_name != 'pull_request'
|
|
run: |
|
|
${{ matrix.devScript }} package Release ${{ matrix.runtime }}
|
|
working-directory: src
|
|
|
|
# Upload runner package tar.gz/zip as artifact
|
|
- name: Publish Artifact
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: runner-package-${{ matrix.runtime }}
|
|
path: |
|
|
_package
|
|
|
|
docker:
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest, ubuntu-24.04-arm ]
|
|
include:
|
|
- os: ubuntu-latest
|
|
docker_platform: linux/amd64
|
|
- os: ubuntu-24.04-arm
|
|
docker_platform: linux/arm64
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Get latest runner version
|
|
id: latest_runner
|
|
uses: actions/github-script@v7
|
|
with:
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
script: |
|
|
const release = await github.rest.repos.getLatestRelease({
|
|
owner: 'actions',
|
|
repo: 'runner',
|
|
});
|
|
const version = release.data.tag_name.replace(/^v/, '');
|
|
core.setOutput('version', version);
|
|
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./images
|
|
load: true
|
|
platforms: ${{ matrix.docker_platform }}
|
|
tags: |
|
|
${{ github.sha }}:latest
|
|
build-args: |
|
|
RUNNER_VERSION=${{ steps.latest_runner.outputs.version }}
|
|
|
|
- name: Test Docker image
|
|
run: |
|
|
docker run --rm ${{ github.sha }}:latest ./run.sh --version
|
|
|