Compare commits

...

9 Commits

Author SHA1 Message Date
d575115b0e dsq 2023-11-19 18:10:45 +01:00
fc3415be5b test2 2023-11-19 18:05:00 +01:00
5c40392fc4 dqfds 2023-11-19 17:59:02 +01:00
b9cb003834 should end 0-9 for package version to not conflict with runner deb action 2023-11-19 17:56:00 +01:00
6df9527db8 adz 2023-11-19 17:52:59 +01:00
cc85f4c476 dsqdsq 2023-11-19 17:51:37 +01:00
9d11f308c4 push change tag trigger 2023-11-19 17:48:39 +01:00
3b544fc61f push change token name 2023-11-19 17:43:32 +01:00
8a26981a06 packages 2023-11-19 16:45:46 +01:00
3 changed files with 29 additions and 10 deletions

View File

@@ -5,7 +5,8 @@ name: ci/cd to build and push docker image in private registry
on:
push:
tags:
tags:
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
- '*-runner'
jobs:
@@ -31,7 +32,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ gitea.repository }}
token: ${{ secrets.ACCESS_TOKEN_GIT }}
token: ${{ secrets.REPO_PULL_GITEA }}
- name: Login to docker private registry
uses: docker/login-action@v3

View File

@@ -1,19 +1,28 @@
name: build_package_deb
env:
PACKAGE_NAME: test2
DEB_OS_TARGET: bullseye
GIT_REPO_URL: gitea.jingoh.fr
MAINTAINER: jingoh
ARCH: amd64
on:
push:
tags:
- 'v*.*.*'
- '*.*.[0-9]'
jobs:
build:
runs-on: ubuntu-latest
build-package-push-repo:
runs-on: debian-bullseye-node
container:
image: debian:bullseye
steps:
- name: Git clone private repository
uses: actions/checkout@v4
with:
repository: ${{ gitea.repository }}
token: ${{ secrets.ACCESS_TOKEN_GIT }}
token: ${{ secrets.REPO_PULL_GITEA }}
- name: create sample script
run: |
@@ -29,10 +38,19 @@ jobs:
chmod +x .debpkg/DEBIAN/postinst
- uses: jiro4989/build-deb-action@v3
with:
package: samplescript
package: ${{ env.PACKAGE_NAME }}
package_root: .debpkg
maintainer: jingoh
maintainer: ${{ env.MAINTAINER }}
version: ${{ gitea.ref_name }} # refs/tags/v*.*.*
arch: 'amd64'
depends: 'libc6 (>= 2.2.1), git'
desc: 'this is sample package.'
desc: 'this is sample package.'
- name: Push packages
run: |
curl --user ${{ vars.REPO_GITEA_USER }}:${{ secrets.PACKAGE_PUSH_REPO }} \
--upload-file ${{ env.PACKAGE_NAME }}_${{ gitea.ref_name }}_${{ env.ARCH }}.deb \
https://${{ env.GIT_REPO_URL }}/api/packages/${{ vars.REPO_GITEA_USER }}/debian/pool/${{ env.DEB_OS_TARGET }}/main/upload
- name: Output
run: echo "Push on ${{ env.GIT_REPO_URL }} with user ${{ vars.REPO_GITEA_USER }} package ${{ env.PACKAGE_NAME }} os ${{ env.DEB_OS_TARGET }} tag ${{ gitea.ref_name }}"

View File

@@ -6,7 +6,7 @@ on: [never]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
runs-on: debian-bullseye-node
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event. Test 4zet"
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"