andy5995 / gh-action-build-deb

Action that builds a Debian package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Action to build Debian packages

This is a GitHub Action that will build a Debian package (.deb file) for various Debian or Ubuntu versions.

Usage

on: [push]

jobs:
  build-deb:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: legoktm/gh-action-build-deb@debian-buster
        id: build-debian-buster
        with:
          args: --nosign

      - uses: actions/upload-artifact@v1
        with:
          name: Packages for buster
          path: output

This Action will build both a source package and then a binary package and place them in a output/ directory.

Each Debian/Ubuntu version to build for has its own branch. The following are currently supported:

Configuration

  • args: arguments to pass to dpkg-buildpackage
  • sources: repositories to add to /etc/apt/sources.list
  • ppa: Name of Ubuntu PPA to add (no ppa: prefix)

Related actions

  • gh-action-auto-dch automatically adds a changelog entry based on the git information and distro.
  • gh-action-dput uploads built packages to a PPA or repository.

Multiple OS versions

A multi-OS version package building matrix might look like:

on: [push, pull_request]

jobs:
  build-deb:
    runs-on: ubuntu-latest
    strategy:
      matrix: 
        distro: [ubuntu-focal, ubuntu-eoan, ubuntu-bionic, debian-buster]
    steps:
      - uses: actions/checkout@v2

      - uses: legoktm/gh-action-build-deb@ubuntu-focal
        if: matrix.distro == 'ubuntu-focal'
        name: Build package for ubuntu-focal
        id: build-ubuntu-focal
        with:
          args: --no-sign

      - uses: legoktm/gh-action-build-deb@ubuntu-eoan
        if: matrix.distro == 'ubuntu-eoan'
        name: Build package for ubuntu-eoan
        id: build-ubuntu-eoan
        with:
          args: --no-sign

      - uses: legoktm/gh-action-build-deb@ubuntu-bionic
        if: matrix.distro == 'ubuntu-bionic'
        name: Build package for ubuntu-bionic
        id: build-ubuntu-bionic
        with:
          args: --no-sign

      - uses: legoktm/gh-action-build-deb@debian-buster
        if: matrix.distro == 'debian-buster'
        name: Build package for debian-buster
        id: build-debian-buster
        with:
          args: --no-sign

      - uses: actions/upload-artifact@v2
        with:
          name: Packages for ${{ matrix.distro }}
          path: output

License

Copyright © 2020 Kunal Mehta under the GPL, version 3 or any later version. Originally based off of the nylas/gh-action-build-deb-buster action, which is Copyright © 2020 David Baumgold under the MIT License.

About

Action that builds a Debian package

License:GNU General Public License v3.0


Languages

Language:Shell 66.8%Language:Dockerfile 33.2%