Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkgr/action

GitHub Action for packaging apps as DEB or RPM. Should be used as a replacement for Packager.io hosted service.

The package action builds missing Ruby, Node, and Python toolchains locally. It caches each toolchain independently from the application build cache. No hosted buildcurl.com or barebuild.com compiler is required.

Local toolchain builds require a Linux AMD64 Docker runner with host networking. GitHub-hosted Ubuntu runners and conventional Linux Docker hosts are supported. Docker Desktop and restricted or rootless Docker daemons are not supported.

Usage

Building Packages

Build packages for multiple Linux distributions in parallel:

name: Package
on: [push]

jobs:
  build:
    name: ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target:
          - debian:10
          - debian:11
          - debian:12
          - ubuntu:20.04
          - ubuntu:22.04
          - ubuntu:24.04
          - el:7
          - el:8
          - el:9
          - sles:12
          - sles:15
    steps:
      - uses: actions/checkout@v4

      - uses: pkgr/action/package@v1
        id: package
        with:
          target: ${{ matrix.target }}
          version: '1.0.0'

      - name: Upload
        uses: actions/upload-artifact@v4
        with:
          name: ${{ steps.package.outputs.package_name }}
          path: ${{ steps.package.outputs.package_path }}

Building and Publishing Packages

To publish packages to a repository, add a separate publish step after building. Contact support@packager.io to obtain a publish token.

name: Package and Publish
on: [push]

jobs:
  build:
    name: ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target:
          - debian:10
          - debian:11
          - debian:12
          - ubuntu:20.04
          - ubuntu:22.04
          - ubuntu:24.04
          - el:7
          - el:8
          - el:9
          - sles:12
          - sles:15
    steps:
      - uses: actions/checkout@v4

      - uses: pkgr/action/package@v1
        id: package
        with:
          target: ${{ matrix.target }}
          version: '1.0.0'

      - name: Upload
        uses: actions/upload-artifact@v4
        with:
          name: ${{ steps.package.outputs.package_name }}
          path: ${{ steps.package.outputs.package_path }}

      - name: Publish
        uses: pkgr/action/publish@v1
        with:
          target: ${{ matrix.target }}
          token: ${{ secrets.PACKAGER_PUBLISH_TOKEN }}
          repository: ${{ github.repository }}
          channel: ${{ github.ref_name }}
          file: ${{ steps.package.outputs.package_path }}

Note: Store your publish token as a GitHub secret named PACKAGER_PUBLISH_TOKEN in your repository settings.

Building packages across linux distributions

About

GitHub Action for packaging apps as DEB or RPM

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages