Compare commits
85 Commits
0.8-waf
...
0.0.49-pok
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ec137bb2f | |||
| 67449229c2 | |||
| b071c56b0b | |||
| 3ed1f871f0 | |||
| b1b247eae2 | |||
| 9c702d6a93 | |||
| 12d1e41abe | |||
| dae201ee41 | |||
| a90cbd05e8 | |||
| c5bc159fe7 | |||
| 148c0c82b7 | |||
| 8ab62bd7ab | |||
| 2afdb334af | |||
| d12a215dce | |||
| 0d012c133d | |||
| af818f3b42 | |||
| 071293ea06 | |||
| f4c7131cc6 | |||
| 42e1a9b824 | |||
| d040748efc | |||
| 74c06b64b9 | |||
| 4a5e991c2e | |||
| d2e101199b | |||
| 6faf71e921 | |||
| a02e13bd10 | |||
| 667102a66f | |||
| 37e069f32d | |||
| 6436e5bb7e | |||
| 5af82cad53 | |||
| 7027cc7b99 | |||
| 42305deba4 | |||
| 6e48d8aacc | |||
| a46dec16e4 | |||
| f32d6ed552 | |||
| 63f05ad07b | |||
| d8ceb8617a | |||
| 19419f081c | |||
| c7f95eac1a | |||
| e35903c81d | |||
| 2646663325 | |||
| 918a458936 | |||
| b7e8bbdecb | |||
| 06b2525ed2 | |||
| 7a173984e1 | |||
| 215e2bc8c9 | |||
| 92e3e1c361 | |||
| c0c2d56ce7 | |||
| 95e0ef920f | |||
| c11d627af3 | |||
| ac5782c26e | |||
| 9e485b4b05 | |||
| 49a3034e8e | |||
| 6acd6c25ce | |||
| 73cb6b2fc8 | |||
| 3bad743147 | |||
| 03d4537a16 | |||
| 3f6543c976 | |||
| 3a6fc95b2d | |||
| 771210d587 | |||
| 83df25380c | |||
| 8d4fdbfb43 | |||
| bcd4fabb9f | |||
| 6d98e00785 | |||
| 9746514b48 | |||
| 45959b6444 | |||
| 61976fa2af | |||
| 75bf25d041 | |||
| 20e2b5d51b | |||
| 11dcd2625a | |||
| 0649fece72 | |||
| dec1e12add | |||
| 5aee8beff8 | |||
| 18fc839376 | |||
| 6445cfac59 | |||
| c223a84285 | |||
| 93a478a8b8 | |||
| c2ee52ac4d | |||
| a23671e961 | |||
| 745e2378af | |||
| bee8958456 | |||
| 0d58811815 | |||
| 7ae17012da | |||
| 73bd9a4581 | |||
| 9d9529db67 | |||
| 1ae6ea877d |
34
.gitea/workflows/build_helm_chart_push.yml
Normal file
34
.gitea/workflows/build_helm_chart_push.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: ci/cd helm chart
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*-chart'
|
||||||
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_REPO: testchart
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
push-helm-chart:
|
||||||
|
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
||||||
|
runs-on: ubuntu-runner
|
||||||
|
container:
|
||||||
|
image: alpine/helm
|
||||||
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Show Information
|
||||||
|
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
||||||
|
- name: clone repo helm chart
|
||||||
|
run: git clone https://${{ secrets.PACKAGE_RW }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}
|
||||||
|
- name: tag release
|
||||||
|
run: |
|
||||||
|
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
|
||||||
|
sed -i "s/^version: .*/version: $VERSION/" /workspace/${{ secrets.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Chart.yaml
|
||||||
|
- name: helm package
|
||||||
|
run: helm package ${{ env.GIT_REPO }}
|
||||||
|
- name: push repo
|
||||||
|
run: |
|
||||||
|
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
|
||||||
|
curl --user ${{ secrets.GIT_USER_REPO }}:${{ secrets.PACKAGE_RW }} -X POST --upload-file /workspace/${{ secrets.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}-$VERSION.tgz https://${{ vars.REGISTRY_DOCKER }}/api/packages/${{ secrets.GIT_USER_REPO }}/helm/api/charts
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
name: ci/cd to build and push docker image debian_runner in private registry
|
|
||||||
|
|
||||||
#https://docs.docker.com/build/ci/github-actions/push-multi-registries/
|
|
||||||
#https://www.devsync.se/ci/cd/docker/2023/10/27/gitea-runner-build-docker-containers.html
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
|
|
||||||
- '*-runner'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-debian-runner:
|
|
||||||
# see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
|
||||||
# runs-on: test
|
|
||||||
# container: debian:bullseye
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# container: node:16-bullseye
|
|
||||||
runs-on: debian-runner
|
|
||||||
container:
|
|
||||||
image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest
|
|
||||||
credentials:
|
|
||||||
username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
|
||||||
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Show Information
|
|
||||||
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
|
||||||
|
|
||||||
- name: Git clone private repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ gitea.repository }}
|
|
||||||
token: ${{ secrets.REPO_PULL_GITEA }}
|
|
||||||
|
|
||||||
- name: Login to docker private registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.REGISTRY_DOCKER }}
|
|
||||||
username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: Build and push image in registry
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }}
|
|
||||||
|
|
||||||
- name: Output
|
|
||||||
run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ vars.DOCKER_IMAGE_NAME }} tag ${{ gitea.ref_name }}"
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
name: ci/cd to build and push docker image wafwoof in private registry
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
|
|
||||||
- '*-waf'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-image:
|
|
||||||
# see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
|
||||||
# runs-on: test
|
|
||||||
# container: debian:bullseye
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# container: node:16-bullseye
|
|
||||||
runs-on: debian-runner
|
|
||||||
container:
|
|
||||||
image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest
|
|
||||||
credentials:
|
|
||||||
username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Show Information
|
|
||||||
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
|
||||||
|
|
||||||
- name: Login to docker private registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.REGISTRY_DOCKER }}
|
|
||||||
username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: git clone repo
|
|
||||||
run: git clone https://github.com/EnableSecurity/wafw00f
|
|
||||||
|
|
||||||
- name: docker build and push
|
|
||||||
run: |
|
|
||||||
docker buildx b wafw00f/Dockerfile -t ${{ vars.DOCKER_IMAGE_WAFWOOF }}
|
|
||||||
docker tag ${{ vars.DOCKER_IMAGE_WAFWOOF }} ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_WAFWOOF }}
|
|
||||||
docker push ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_WAFWOOF }}
|
|
||||||
|
|
||||||
- name: Output
|
|
||||||
run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ vars.DOCKER_IMAGE_WAFWOOF }} tag ${{ gitea.ref_name }}"
|
|
||||||
77
.gitea/workflows/build_push_internal_docker.yml
Normal file
77
.gitea/workflows/build_push_internal_docker.yml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
name: ci/cd internal docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*-internal'
|
||||||
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_REPO: gitea-runner
|
||||||
|
DOCKER_IMAGE_NAME: tryhard
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-internal:
|
||||||
|
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
||||||
|
# runs-on: test
|
||||||
|
# container: debian:bullseye
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container: node:16-bullseye
|
||||||
|
runs-on: ubuntu-runner
|
||||||
|
container:
|
||||||
|
image: docker
|
||||||
|
# container:
|
||||||
|
# image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest
|
||||||
|
# credentials:
|
||||||
|
# username: ${{ secrets.GIT_USER_REPO }}
|
||||||
|
# password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
||||||
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Show Information
|
||||||
|
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
||||||
|
- name: clone & build
|
||||||
|
run: |
|
||||||
|
git clone https://${{ secrets.REGISTRY_DOCKER_PASS }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}
|
||||||
|
cd ${{ env.GIT_REPO }}
|
||||||
|
docker buildx b . -t ${{ env.DOCKER_IMAGE_NAME }}
|
||||||
|
- name: login & push
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.PACKAGE_RW }}" | docker login -u ${{ secrets.GIT_USER_REPO }} --password-stdin ${{ vars.REGISTRY_DOCKER }}
|
||||||
|
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
|
||||||
|
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
|
||||||
|
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
|
echo "docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION"
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
|
|
||||||
|
# docker pull gitea.jingoh.fr/staffadmin/test:0.0.1
|
||||||
|
# docker tag gitea.jingoh.fr/staffadmin/test:0.0.1 gitea.jingoh.fr/staffadmin/toto:latest
|
||||||
|
# docker push gitea.jingoh.fr/staffadmin/toto:latest
|
||||||
|
|
||||||
|
|
||||||
|
# - name: Git clone private repository
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# with:
|
||||||
|
# repository: ${{ gitea.repository }}
|
||||||
|
# token: ${{ secrets.REPO_PULL_GITEA }}
|
||||||
|
|
||||||
|
# - name: Login to docker private registry
|
||||||
|
# uses: docker/login-action@v3
|
||||||
|
# with:
|
||||||
|
# registry: ${{ vars.REGISTRY_DOCKER }}
|
||||||
|
# username: ${{ secrets.GIT_USER_REPO }}
|
||||||
|
# password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
||||||
|
|
||||||
|
|
||||||
|
# - run: git --help
|
||||||
|
|
||||||
|
# - name: Build and push image in registry
|
||||||
|
# uses: docker/build-push-action@v5
|
||||||
|
# with:
|
||||||
|
# context: .
|
||||||
|
# push: true
|
||||||
|
# tags: ${{ vars.REGISTRY_DOCKER }}/${{ env.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ env.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }}
|
||||||
|
|
||||||
|
# - name: Output
|
||||||
|
# run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ env.DOCKER_IMAGE_NAME }} tag ${{ gitea.ref_name }}"
|
||||||
86
.gitea/workflows/build_push_internal_docker_poker.yml
Normal file
86
.gitea/workflows/build_push_internal_docker_poker.yml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
name: ci/cd internal docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*-poker'
|
||||||
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_REPO: poker-master-tool
|
||||||
|
DOCKER_IMAGE_NAME: poker
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-poker:
|
||||||
|
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
||||||
|
# runs-on: test
|
||||||
|
# container: debian:bullseye
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container: node:16-bullseye
|
||||||
|
runs-on: ubuntu-runner
|
||||||
|
container:
|
||||||
|
image: docker
|
||||||
|
# container:
|
||||||
|
# image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest
|
||||||
|
# credentials:
|
||||||
|
# username: ${{ vars.GIT_USER_REPO }}
|
||||||
|
# password: ${{ secrets.PACKAGE_RW }}
|
||||||
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Show Information
|
||||||
|
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
||||||
|
- name: Git clone private repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: ${{ vars.GIT_USER_REPO }}/${{ env.GIT_REPO }}
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.REPOSITORY_RW }}
|
||||||
|
- name: clone & build
|
||||||
|
run: |
|
||||||
|
cd ${{ env.GIT_REPO }}
|
||||||
|
pwd
|
||||||
|
echo "sed -i "s/^FROM .*/FROM node:18/" /workspace/${{ vars.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Dockerfile"
|
||||||
|
sed -i "s/^FROM .*/FROM node:18/" /workspace/${{ vars.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Dockerfile
|
||||||
|
cat /workspace/${{ vars.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Dockerfile
|
||||||
|
docker buildx b . -t ${{ env.DOCKER_IMAGE_NAME }}
|
||||||
|
- name: login & push
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.PACKAGE_RW }}" | docker login -u ${{ vars.GIT_USER_REPO }} --password-stdin ${{ vars.REGISTRY_DOCKER }}
|
||||||
|
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
|
||||||
|
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ vars.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
|
||||||
|
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ vars.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
|
echo "docker push ${{ vars.REGISTRY_DOCKER }}/${{ vars.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION"
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ vars.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ vars.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
|
|
||||||
|
# docker pull gitea.jingoh.fr/staffadmin/test:0.0.1
|
||||||
|
# docker tag gitea.jingoh.fr/staffadmin/test:0.0.1 gitea.jingoh.fr/staffadmin/toto:latest
|
||||||
|
# docker push gitea.jingoh.fr/staffadmin/toto:latest
|
||||||
|
|
||||||
|
|
||||||
|
# - name: Git clone private repository
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# with:
|
||||||
|
# repository: ${{ gitea.repository }}
|
||||||
|
# token: ${{ secrets.REPO_PULL_GITEA }}
|
||||||
|
|
||||||
|
# - name: Login to docker private registry
|
||||||
|
# uses: docker/login-action@v3
|
||||||
|
# with:
|
||||||
|
# registry: ${{ vars.REGISTRY_DOCKER }}
|
||||||
|
# username: ${{ vars.GIT_USER_REPO }}
|
||||||
|
# password: ${{ secrets.PACKAGE_RW }}
|
||||||
|
|
||||||
|
|
||||||
|
# - run: git --help
|
||||||
|
|
||||||
|
# - name: Build and push image in registry
|
||||||
|
# uses: docker/build-push-action@v5
|
||||||
|
# with:
|
||||||
|
# context: .
|
||||||
|
# push: true
|
||||||
|
# tags: ${{ vars.REGISTRY_DOCKER }}/${{ env.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ env.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }}
|
||||||
|
|
||||||
|
# - name: Output
|
||||||
|
# run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ env.DOCKER_IMAGE_NAME }} tag ${{ gitea.ref_name }}"
|
||||||
47
.gitea/workflows/build_push_internal_docker_spiderfoot.yml
Normal file
47
.gitea/workflows/build_push_internal_docker_spiderfoot.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: ci/cd internal docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*-spiderfoot'
|
||||||
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_REPO: spiderfoot
|
||||||
|
DOCKER_IMAGE_NAME: spiderfoot
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-spiderfoot:
|
||||||
|
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
||||||
|
# runs-on: test
|
||||||
|
# container: debian:bullseye
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container: node:16-bullseye
|
||||||
|
runs-on: ubuntu-runner
|
||||||
|
container:
|
||||||
|
image: docker
|
||||||
|
# container:
|
||||||
|
# image: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_RUNNER }}:latest
|
||||||
|
# credentials:
|
||||||
|
# username: ${{ secrets.GIT_USER_REPO }}
|
||||||
|
# password: ${{ secrets.PACKAGE_RW }}
|
||||||
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Show Information
|
||||||
|
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
||||||
|
- name: clone & build
|
||||||
|
run: |
|
||||||
|
git clone https://${{ secrets.PACKAGE_RW }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}
|
||||||
|
cd ${{ env.GIT_REPO }}
|
||||||
|
cat /workspace/${{ secrets.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Dockerfile
|
||||||
|
docker buildx b . -t ${{ env.DOCKER_IMAGE_NAME }}
|
||||||
|
- name: login & push
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.PACKAGE_RW }}" | docker login -u ${{ secrets.GIT_USER_REPO }} --password-stdin ${{ vars.REGISTRY_DOCKER }}
|
||||||
|
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
|
||||||
|
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
|
||||||
|
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
|
echo "docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION"
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: build_package_deb
|
name: build and push deb package
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PACKAGE_NAME: test3
|
PACKAGE_NAME: test3
|
||||||
@@ -10,7 +10,7 @@ env:
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*.*.[0-9]'
|
- '*-package'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-package-push-repo:
|
build-package-push-repo:
|
||||||
@@ -47,9 +47,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Push packages
|
- name: Push packages
|
||||||
run: |
|
run: |
|
||||||
curl --user ${{ vars.REPO_GITEA_USER }}:${{ secrets.PACKAGE_PUSH_REPO }} \
|
curl --user ${{ secrets.GIT_USER_REPO }}:${{ secrets.PACKAGE_RW }} \
|
||||||
--upload-file ${{ env.PACKAGE_NAME }}_${{ gitea.ref_name }}_${{ env.ARCH }}.deb \
|
--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
|
https://${{ env.GIT_REPO_URL }}/api/packages/${{ secrets.GIT_USER_REPO }}/debian/pool/${{ env.DEB_OS_TARGET }}/main/upload
|
||||||
|
|
||||||
- name: Output
|
- name: Output
|
||||||
run: echo "Runner 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: echo "Runner push on ${{ env.GIT_REPO_URL }} with user ${{ secrets.GIT_USER_REPO }} package ${{ env.PACKAGE_NAME }} os ${{ env.DEB_OS_TARGET }} tag ${{ gitea.ref_name }}"
|
||||||
43
.gitea/workflows/build_push_public_docker.yml
Normal file
43
.gitea/workflows/build_push_public_docker.yml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
name: ci/cd public docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
|
||||||
|
- '*-public'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_REPO: wafw00f
|
||||||
|
GIT_SERVER: https://github.com/EnableSecurity
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-public:
|
||||||
|
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
|
||||||
|
# runs-on: test
|
||||||
|
# container: debian:bullseye
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container: node:16-bullseye
|
||||||
|
runs-on: ubuntu-runner
|
||||||
|
container:
|
||||||
|
image: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Show Information
|
||||||
|
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
|
||||||
|
|
||||||
|
- name: clone & build & push
|
||||||
|
run: |
|
||||||
|
git clone ${{ env.GIT_SERVER }}/${{ env.GIT_REPO }}
|
||||||
|
cd ${{ env.GIT_REPO }}
|
||||||
|
docker buildx b . -t ${{ env.GIT_REPO }}
|
||||||
|
- name: login & push
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.PACKAGE_RW }}" | docker login -u ${{ secrets.GIT_USER_REPO }} --password-stdin ${{ vars.REGISTRY_DOCKER }}
|
||||||
|
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
|
||||||
|
docker tag ${{ env.GIT_REPO }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}:$VERSION
|
||||||
|
docker tag ${{ env.GIT_REPO }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}:latest
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}:$VERSION
|
||||||
|
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.GIT_REPO }}:latest
|
||||||
|
|
||||||
|
- name: Output
|
||||||
|
run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ env.GIT_REPO }} tag ${{ gitea.ref_name }}"
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
name: Gitea Actions Demo
|
name: Gitea Actions Demo
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
on: [never]
|
# on: [push]
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*-demo'
|
||||||
## Exemple https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
|
## Exemple https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -13,9 +16,10 @@ jobs:
|
|||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
- run: echo "lala"
|
|
||||||
- run: echo "${{ vars.TEST }}"
|
|
||||||
- name: List files in the repository
|
|
||||||
run: |
|
|
||||||
ls ${{ gitea.workspace }}
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
- name: Git clone private repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: staffadmin/semaphore
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.REPO_PULL_GITEA }}
|
||||||
42
Dockerfile
42
Dockerfile
@@ -4,27 +4,27 @@ FROM debian:bullseye
|
|||||||
|
|
||||||
ENV NODE_MAJOR 16
|
ENV NODE_MAJOR 16
|
||||||
|
|
||||||
# install dependancies packages
|
# # install dependancies packages
|
||||||
RUN apt-get update \
|
# RUN apt-get update \
|
||||||
&& apt-get install -y curl \
|
# && apt-get install -y curl \
|
||||||
dnsutils \
|
# dnsutils \
|
||||||
git \
|
# git \
|
||||||
ca-certificates \
|
# ca-certificates \
|
||||||
gnupg
|
# gnupg
|
||||||
|
|
||||||
# NODE
|
# # NODE
|
||||||
RUN install -m 0755 -d /etc/apt/keyrings
|
# RUN install -m 0755 -d /etc/apt/keyrings
|
||||||
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
# RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||||
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
# RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||||
|
|
||||||
# DOCKER
|
# # DOCKER
|
||||||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
# RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
RUN chmod a+r /etc/apt/keyrings/docker.gpg
|
# RUN chmod a+r /etc/apt/keyrings/docker.gpg
|
||||||
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
# RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
|
||||||
RUN apt-get update \
|
# RUN apt-get update \
|
||||||
&& apt-get install -y nodejs \
|
# && apt-get install -y nodejs \
|
||||||
docker-ce \
|
# docker-ce \
|
||||||
docker-ce-cli \
|
# docker-ce-cli \
|
||||||
containerd.io \
|
# containerd.io \
|
||||||
docker-buildx-plugin
|
# docker-buildx-plugin
|
||||||
Reference in New Issue
Block a user