test one push two tags

This commit is contained in:
2023-11-19 16:34:45 +01:00
parent 35cbac9328
commit df42190f94
2 changed files with 40 additions and 2 deletions

View File

@@ -6,10 +6,10 @@ name: ci/cd to build and push docker image in private registry
on:
push:
tags:
- '*'
- '*-runner'
jobs:
build-debian-runner:
build-and-push-debian-runner:
# see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
# runs-on: test
# container: debian:bullseye

View File

@@ -0,0 +1,38 @@
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.'