Git Product home page Git Product logo

gh-action-sdk's Introduction

OpenWrt GitHub Action SDK

GitHub CI action to build packages via SDK using official OpenWrt SDK Docker containers. This is primary used to test build OpenWrt repositories but can also be used for downstream projects maintaining their own package repositories.

Example usage

The following YAML code can be used to build all packages of a repository and store created ipk files as artifacts.

name: Test Build

on:
  pull_request:
    branches:
      - main

jobs:
  build:
    name: ${{ matrix.arch }} build
    runs-on: ubuntu-latest
    strategy:
      matrix:
        arch:
          - x86_64
          - mips_24kc

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Build
        uses: openwrt/gh-action-sdk@main
        env:
          ARCH: ${{ matrix.arch }}

      - name: Store packages
        uses: actions/upload-artifact@v2
        with:
          name: ${{ matrix.arch}}-packages
          path: bin/packages/${{ matrix.arch }}/packages/*.ipk

Environmental variables

The action reads a few env variables:

  • ARCH determines the used OpenWrt SDK Docker container. E.g. x86_64 or x86_64-22.03.2.
  • ARTIFACTS_DIR determines where built packages and build logs are saved. Defaults to the default working directory (GITHUB_WORKSPACE).
  • DL_DIR determines where download source code packages are saved. Defaults to the default working directory (GITHUB_WORKSPACE).
  • BUILD_LOG stores build logs in ./logs.
  • CONTAINER can set other SDK containers than openwrt/sdk.
  • EXTRA_FEEDS are added to the feeds.conf, where | are replaced by white spaces.
  • FEED_DIR used in the created feeds.conf for the current repo. Defaults to the default working directory (GITHUB_WORKSPACE).
  • FEEDNAME used in the created feeds.conf for the current repo. Defaults to action.
  • IGNORE_ERRORS can ignore failing packages builds.
  • INDEX makes the action build the package index. Default is 0. Set to 1 to enable.
  • KEY_BUILD can be a private Signify/usign key to sign the packages feed.
  • NO_DEFAULT_FEEDS disable adding the default SDK feeds
  • NO_REPO_FEEDS disable adding the default working directory as feeds
  • NO_REFRESH_CHECK disable check if patches need a refresh.
  • NO_SHFMT_CHECK disable check if init files are formated
  • PACKAGES (Optional) specify the list of packages (space separated) to be built
  • V changes the build verbosity level.

gh-action-sdk's People

Contributors

aparcar avatar jefferyto avatar muink avatar ekkog avatar cmangla avatar moetayuko avatar lipnitsk avatar ynezz avatar utoni avatar hzyitc avatar neheb avatar 1715173329 avatar

Forkers

frizkyiman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.