From df42190f94573c904d9969af372818663ac52b54 Mon Sep 17 00:00:00 2001 From: staffadmin Date: Sun, 19 Nov 2023 16:34:45 +0100 Subject: [PATCH] test one push two tags --- ...nner.yml => build_image_debian_runner.yml} | 4 +- .gitea/workflows/build_package_deb.yml | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) rename .gitea/workflows/{build_debian_runner.yml => build_image_debian_runner.yml} (97%) create mode 100644 .gitea/workflows/build_package_deb.yml diff --git a/.gitea/workflows/build_debian_runner.yml b/.gitea/workflows/build_image_debian_runner.yml similarity index 97% rename from .gitea/workflows/build_debian_runner.yml rename to .gitea/workflows/build_image_debian_runner.yml index b27a5b8..07bf757 100644 --- a/.gitea/workflows/build_debian_runner.yml +++ b/.gitea/workflows/build_image_debian_runner.yml @@ -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 diff --git a/.gitea/workflows/build_package_deb.yml b/.gitea/workflows/build_package_deb.yml new file mode 100644 index 0000000..2984511 --- /dev/null +++ b/.gitea/workflows/build_package_deb.yml @@ -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.' \ No newline at end of file