2024-05-15 20:55:09 +02:00
name : Build Debian package
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on :
push :
2024-05-15 21:15:44 +02:00
branches : [ 'master' , 'main' ]
2024-05-15 20:55:09 +02:00
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
2024-05-15 21:33:35 +02:00
env :
DISTRIBUTION : bookworm
COMPONENT : main
# USER: marco-private
2024-05-15 20:55:09 +02:00
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs :
build-and-push-image :
runs-on : docker
container :
image : catthehacker/ubuntu:act-latest
steps :
- name : Checkout repository
uses : actions/checkout@v4
2024-05-15 21:33:35 +02:00
- name : Install dependencies
run : apt-get update && apt-get install build-essential debhelper
2024-05-15 21:16:58 +02:00
2024-05-15 20:55:09 +02:00
- name : Build Debian package
run : dpkg-buildpackage -us -uc -b --target-arch amd64
2024-05-15 21:33:35 +02:00
- name : Push to registry
run : curl --user ${{ github.actor }}:${{secrets.REGISTRY_TOKEN}} --upload-file $(ls *.deb) https://git.marcorealacci.me/api/packages/packages/debian/pool/${{env.DISTRIBUTION}}/${{env.COMPONENT}}/upload