Skip to content

GitHub Action for building Debian packages on Stretch

License

Notifications You must be signed in to change notification settings

nylas/build-dpkg-stretch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Debian Package: Stretch

This is a GitHub Action that will build a Debian package (.deb file) using the latest version of Debian Stretch.

Usage

on:
  push:
    branches:
      - master

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

      - uses: singingwolfboy/build-dpkg-stretch@v1
        id: build
        with:
          args: --unsigned-source --unsigned-changes

      - uses: actions/upload-artifact@v1
        with:
          name: ${{ steps.build.outputs.filename }}
          path: ${{ steps.build.outputs.filename }}

This Action wraps the dpkg-buildpackage command. To use it, you must have a debian directory at the top of your repository, with all the files that dpkg-buildpackage expects.

This Action does the following things inside a Docker container:

  1. Call mk-build-deps to ensure that the build dependencies defined the debian/control file are installed in the Docker image.
  2. Call dpkg-buildpackage with whatever arguments are passed to the args input in the step definition.
  3. Move the resulting *.deb files into the top level of your repository, so that other GitHub Actions steps can process them futher.
  4. Set the filename and filename-dbgsym outputs, so that other GitHub Actions steps can easily reference the resulting files.

Related

If you need to build Debian packages on a different release, check out the following:

If you want to upload the package to Amazon S3 instead of using actions/upload-artifact, you may want to use the official Docker image for the AWS CLI, like this:

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

      - uses: singingwolfboy/build-dpkg-stretch@v1
        id: build
        with:
          args: --unsigned-source --unsigned-changes

      - uses: docker://amazon/aws-cli:latest
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        with:
          args: >-
            s3
            cp
            ${{ steps.build.outputs.filename }}
            s3://my-bucket-name/${{ steps.build.outputs.filename }}
            --content-type "application/vnd.debian.binary-package"

About

GitHub Action for building Debian packages on Stretch

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •