ARM Runner Action 使用教程

ARM Runner Action 使用教程

arm-runner-actionRun tests natively and build images directly from GitHub Actions using a chroot-based virtualized Raspberry Pi (raspios/raspbian) environment项目地址:https://gitcode.com/gh_mirrors/ar/arm-runner-action

1. 项目的目录结构及介绍

ARM Runner Action 是一个用于在 GitHub Actions 中运行 ARM 架构命令的复合动作。以下是该项目的目录结构及其介绍:

arm-runner-action/
├── LICENSE
├── README.md
├── action.yml
├── cleanup_image.sh
├── download_image.sh
├── mount_image.sh
└── qemu-wrapper.c
  • LICENSE: 项目的许可证文件,采用 BSD-3-Clause 许可证。
  • README.md: 项目的说明文档,包含项目的基本介绍和使用方法。
  • action.yml: 定义 GitHub Action 的配置文件。
  • cleanup_image.sh: 清理镜像的脚本。
  • download_image.sh: 下载镜像的脚本。
  • mount_image.sh: 挂载镜像的脚本。
  • qemu-wrapper.c: QEMU 包装器的源代码文件。

2. 项目的启动文件介绍

项目的启动文件是 action.yml,它定义了 GitHub Action 的配置和执行步骤。以下是 action.yml 的主要内容:

name: ARM runner
description: Composite action to run commands within a qemu chrooted environment
inputs:
  base_image:
    description: 'Base image to use'
    required: true
  cpu:
    description: 'CPU to emulate'
    required: true
  cpu_info:
    description: 'CPU info'
    required: true
  commands:
    description: 'Commands to run'
    required: true
runs:
  using: 'composite'
  steps:
    - run: |
        echo "Running ARM runner with base image ${{ inputs.base_image }}"
        echo "CPU: ${{ inputs.cpu }}"
        echo "CPU info: ${{ inputs.cpu_info }}"
        echo "Commands: ${{ inputs.commands }}"
      shell: bash
  • name: 动作的名称。
  • description: 动作的描述。
  • inputs: 定义输入参数,包括 base_imagecpucpu_infocommands
  • runs: 定义执行步骤,使用 composite 模式,并运行指定的命令。

3. 项目的配置文件介绍

项目的配置文件是 action.yml,它定义了 GitHub Action 的输入参数和执行步骤。以下是配置文件的主要内容:

inputs:
  base_image:
    description: 'Base image to use'
    required: true
  cpu:
    description: 'CPU to emulate'
    required: true
  cpu_info:
    description: 'CPU info'
    required: true
  commands:
    description: 'Commands to run'
    required: true
  • base_image: 指定要使用的基本镜像。
  • cpu: 指定要模拟的 CPU。
  • cpu_info: 指定 CPU 信息。
  • commands: 指定要运行的命令。

通过这些配置,用户可以在 GitHub Actions 中运行 ARM 架构的命令,并进行测试和构建镜像。

arm-runner-actionRun tests natively and build images directly from GitHub Actions using a chroot-based virtualized Raspberry Pi (raspios/raspbian) environment项目地址:https://gitcode.com/gh_mirrors/ar/arm-runner-action

  • 11
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

裴若音Nola

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值