Build
All checks were successful
Deploy Container Image to Registry / build-image (push) Successful in 35s

Signed-off-by: Patrick Niebeling <patrick.niebeling@adacor.com>
This commit is contained in:
Patrick Niebeling
2024-11-19 16:07:45 +01:00
parent 6de14d2dc6
commit 27993d0a4b

View File

@ -8,7 +8,18 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run Build Hook
- name: Build Image
run: |
echo "[***] Build hook running"
cd ${{ gitea.workspace }}/StableV2/
bash hooks/build
VERSION=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^[[:xdigit:]]\{40\}[[:blank:]]refs\/tags\/\([0-9]\{1\}\.[0-9]\{1,2\}\($\|\.[0-9]\{1,2\}$\)\)/\1/p" | sort --version-sort | tail -1)
IMAGE_NAME=docker-rspamd
docker build \
--no-cache \
--build-arg VERSION=${VERSION} \
--build-arg COMMIT=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^\([[:xdigit:]]\{40\}\)[[:blank:]]refs\/tags\/${VERSION}^{}$/\1/p" | xargs git rev-parse --short) \
--build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
--build-arg DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
-t gitea.gnilebein.de/gnilebein/${IMAGE_NAME} .