feature/use-buildkit #11

Merged
RogerSik merged 6 commits from feature/use-buildkit into main 2025-10-31 12:03:30 +01:00
3 changed files with 89 additions and 57 deletions
Showing only changes of commit 5bc5259883 - Show all commits

View File

@@ -1,35 +1,69 @@
name: docker-monica-build development # name: docker-monica-build development
# on:
# push:
# branches-ignore:
# - main # Läuft auf allen Branches außer `main`
# jobs:
# dockerfile_lint:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - uses: hadolint/hadolint-action@v3.1.0
# with:
# dockerfile: Dockerfile
# build:
# needs: dockerfile_lint
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - name: Clean Branch Name
# id: clean_branch_name
# run: |
# CLEANED_BRANCH_NAME=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | tr '/_' '-')
# echo "CLEAN_BRANCH_NAME=${CLEANED_BRANCH_NAME}" >> $GITHUB_ENV
# - name: Kaniko build
# uses: aevea/action-kaniko@v0.12.0
# with:
# image: rogersik/monica
# registry: gitea.sikorski.cloud
# tag: "${{ env.CLEAN_BRANCH_NAME }}"
# cache: true
# username: rogersik
# password: ${{ secrets.REGISTRY_PASSWORD }}
name: ci
on: on:
push: push:
branches-ignore:
- main # Läuft auf allen Branches außer `main`
jobs: jobs:
dockerfile_lint: docker:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Login to gitea.sikorski.cloud
- uses: hadolint/hadolint-action@v3.1.0 uses: docker/login-action@v3
with: with:
dockerfile: Dockerfile registry: gitea.sikorski.cloud
username: rogersik
password: ${{ secrets.REGISTRY_PASSWORD }}
build: - name: Set up QEMU
needs: dockerfile_lint uses: docker/setup-qemu-action@v3
runs-on: ubuntu-22.04
steps: - name: Set up Docker Buildx
- uses: actions/checkout@v4 uses: docker/setup-buildx-action@v3
- name: Clean Branch Name
- name: Create Branch Name as valid tag name
id: clean_branch_name id: clean_branch_name
run: | run: |
CLEANED_BRANCH_NAME=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | tr '/_' '-') CLEANED_BRANCH_NAME=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | tr '/_' '-')
echo "CLEAN_BRANCH_NAME=${CLEANED_BRANCH_NAME}" >> $GITHUB_ENV echo "CLEAN_BRANCH_NAME=${CLEANED_BRANCH_NAME}" >> $GITHUB_ENV
- name: Kaniko build
uses: aevea/action-kaniko@v0.12.0 - name: Build and push
uses: docker/build-push-action@v6
with: with:
image: rogersik/monica push: true
registry: gitea.sikorski.cloud tags: gitea.sikorski.cloud/rogersik/monica:"${{ env.CLEAN_BRANCH_NAME }}"
tag: "${{ env.CLEAN_BRANCH_NAME }}"
cache: true
username: rogersik
password: ${{ secrets.REGISTRY_PASSWORD }}

View File

@@ -1,34 +1,34 @@
name: docker-monica-build main # name: docker-monica-build main
on: # on:
push: # push:
tags: # tags:
- '[0-9]+.*' # - '[0-9]+.*'
jobs: # jobs:
dockerfile_lint: # dockerfile_lint:
runs-on: ubuntu-22.04 # runs-on: ubuntu-22.04
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- uses: hadolint/hadolint-action@v3.1.0 # - uses: hadolint/hadolint-action@v3.1.0
with: # with:
dockerfile: Dockerfile # dockerfile: Dockerfile
build: # build:
needs: dockerfile_lint # needs: dockerfile_lint
runs-on: ubuntu-22.04 # runs-on: ubuntu-22.04
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- name: Extract Git Tag # - name: Extract Git Tag
id: get_tag # id: get_tag
run: echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV # run: echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Kaniko build # - name: Kaniko build
uses: aevea/action-kaniko@v0.12.0 # uses: aevea/action-kaniko@v0.12.0
with: # with:
image: rogersik/monica # image: rogersik/monica
registry: gitea.sikorski.cloud # registry: gitea.sikorski.cloud
tag: '${{ env.TAG }}' # tag: '${{ env.TAG }}'
cache: true # cache: true
build_args: | # build_args: |
GIT_TAG=${{ env.TAG }} # GIT_TAG=${{ env.TAG }}
username: rogersik # username: rogersik
password: ${{ secrets.REGISTRY_PASSWORD }} # password: ${{ secrets.REGISTRY_PASSWORD }}

View File

@@ -1,8 +1,6 @@
# monica docker image # monica docker image
Branch: main [![Build Status](https://drone.sikorski.cloud/api/badges/RogerSik/Docker-monica/status.svg?ref=refs/heads/main)](https://drone.sikorski.cloud/RogerSik/Docker-monica)
This images extends This images extends
* PHP Upload Limit (50MB) * PHP Upload Limit (50MB)
* supervisord for Cronjobs like E-Mail notifications * supervisord for Cronjobs like E-Mail notifications