Compare commits

...

4 Commits

Author SHA1 Message Date
2fcd604e04 [Add dockerlazy build] 2025-08-31 19:21:52 +02:00
0d64737451 [Add dockerlazy build] 2025-08-31 19:16:11 +02:00
d29ca160ed [Remove schedule] 2025-08-30 15:58:43 +02:00
bee97795da [Change cron] 2025-08-23 15:09:43 +02:00
3 changed files with 66 additions and 4 deletions

View File

@@ -0,0 +1,62 @@
name: ci/cd internal docker image
on:
push:
tags:
- '*-lazydocker'
# schedule:
# - cron: '0 8 2 * *'
env:
GIT_REPO: lazydocker
DOCKER_IMAGE_NAME: lazydocker
jobs:
build-push-lazydocker:
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
runs-on: ubuntu-latest
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
run: |
git clone https://${{ secrets.REPOSITORY_RW }}:x-oauth-basic@${{ vars.REGISTRY_DOCKER }}/${{ vars.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 ${{ 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
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
# pull-up-lazydocker:
# #! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
# runs-on: ubuntu-latest
# container:
# image: ubuntu
# steps:
# - name: Install required packages
# run: |
# apt-get -y update
# apt-get install -y curl
# - name: Pull and up container
# uses: appleboy/ssh-action@v1
# with:
# host: 163.172.84.28
# username: stephane
# key: ${{ secrets.SSH_KEY }}
# passphrase: ${{ secrets.SSH_PASS }}
# port: 22
# script: |
# docker compose -f /opt/dockerapps/docker-compose.yml pull ${{ env.DOCKER_IMAGE_NAME }}
# docker compose -f /opt/dockerapps/docker-compose.yml up -d ${{ env.DOCKER_IMAGE_NAME }}

View File

@@ -4,8 +4,8 @@ on:
push:
tags:
- '*-poker'
schedule:
- cron: '0 9 1 * *'
# schedule:
# - cron: '0 9 2 * *'
env:
GIT_REPO: poker-master-tool

View File

@@ -4,8 +4,8 @@ on:
push:
tags:
- '*-vwmetrics'
schedule:
- cron: '0 8 1 * *'
# schedule:
# - cron: '0 8 2 * *'
env:
GIT_REPO: vwmetrics