Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9366bb40a0 | |||
| d575115b0e | |||
| fc3415be5b | |||
| 5c40392fc4 | |||
| b9cb003834 | |||
| 6df9527db8 | |||
| cc85f4c476 | |||
| 9d11f308c4 | |||
| 3b544fc61f |
@@ -6,6 +6,7 @@ name: ci/cd to build and push docker image in private registry
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
|
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
|
||||||
- '*-runner'
|
- '*-runner'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -31,7 +32,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ gitea.repository }}
|
repository: ${{ gitea.repository }}
|
||||||
token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
token: ${{ secrets.REPO_PULL_GITEA }}
|
||||||
|
|
||||||
- name: Login to docker private registry
|
- name: Login to docker private registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|||||||
@@ -1,23 +1,26 @@
|
|||||||
name: build_package_deb
|
name: build_package_deb
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_USER: staffadmin
|
PACKAGE_NAME: test2
|
||||||
DEB_OS_TARGET: bullseye
|
DEB_OS_TARGET: bullseye
|
||||||
|
GIT_REPO_URL: gitea.jingoh.fr
|
||||||
|
MAINTAINER: jingoh
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- '*.*.[0-9]'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-package-push-repo:
|
||||||
runs-on: ubuntu-latest
|
runs-on: debian-bullseye-node
|
||||||
steps:
|
steps:
|
||||||
- name: Git clone private repository
|
- name: Git clone private repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ gitea.repository }}
|
repository: ${{ gitea.repository }}
|
||||||
token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
token: ${{ secrets.REPO_PULL_GITEA }}
|
||||||
|
|
||||||
- name: create sample script
|
- name: create sample script
|
||||||
run: |
|
run: |
|
||||||
@@ -33,20 +36,19 @@ jobs:
|
|||||||
chmod +x .debpkg/DEBIAN/postinst
|
chmod +x .debpkg/DEBIAN/postinst
|
||||||
- uses: jiro4989/build-deb-action@v3
|
- uses: jiro4989/build-deb-action@v3
|
||||||
with:
|
with:
|
||||||
package: samplescript
|
package: ${{ env.PACKAGE_NAME }}
|
||||||
package_root: .debpkg
|
package_root: .debpkg
|
||||||
maintainer: jingoh
|
maintainer: ${{ env.MAINTAINER }}
|
||||||
version: ${{ gitea.ref_name }} # refs/tags/v*.*.*
|
version: ${{ gitea.ref_name }} # refs/tags/v*.*.*
|
||||||
arch: 'amd64'
|
arch: 'amd64'
|
||||||
depends: 'libc6 (>= 2.2.1), git'
|
depends: 'libc6 (>= 2.2.1), git'
|
||||||
desc: 'this is sample package.'
|
desc: 'this is sample package.'
|
||||||
|
|
||||||
- name: Show Information
|
- name: Push packages
|
||||||
run: sleep 300
|
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
|
||||||
# - name: Show Information
|
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 }}"
|
||||||
# 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
|
|
||||||
@@ -6,7 +6,7 @@ on: [never]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: debian-bullseye-node
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event. Test 4zet"
|
- 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!"
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
|
|||||||
Reference in New Issue
Block a user