diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 4b45b43..6cdb6aa 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -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 \ No newline at end of file + 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} . + + \ No newline at end of file