Files
gitea-runner/.gitea/workflows/build_package_deb.yml
2023-11-19 16:34:45 +01:00

38 lines
1.1 KiB
YAML

name: build_package_deb
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git clone private repository
uses: actions/checkout@v4
with:
repository: ${{ gitea.repository }}
token: ${{ secrets.ACCESS_TOKEN_GIT }}
- name: create sample script
run: |
mkdir -p .debpkg/usr/bin
mkdir -p .debpkg/usr/lib/samplescript
echo -e "echo sample" > .debpkg/usr/bin/samplescript
chmod +x .debpkg/usr/bin/samplescript
echo -e "a=1" > .debpkg/usr/lib/samplescript/samplescript.conf
# create DEBIAN directory if you want to add other pre/post scripts
mkdir -p .debpkg/DEBIAN
echo -e "echo postinst" > .debpkg/DEBIAN/postinst
chmod +x .debpkg/DEBIAN/postinst
- uses: jiro4989/build-deb-action@v3
with:
package: samplescript
package_root: .debpkg
maintainer: jingoh
version: ${{ gitea.ref_name }} # refs/tags/v*.*.*
arch: 'amd64'
depends: 'libc6 (>= 2.2.1), git'
desc: 'this is sample package.'