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

53 lines
1.5 KiB
YAML

name: build_package_deb
env:
GITEA_USER: staffadmin
DEB_OS_TARGET: bullseye
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.'
- name: Show Information
run: sleep 300
# - name: Show Information
# run: |
# curl --user staffadmin: \
# --upload-file path/to/file.deb \
# https://gitea.jingoh.fr/api/packages/${{ env.GITEA_USER }}/debian/pool/${{ env.DEB_OS_TARGET }}/main/upload