name: Deploy Container Image to Registry on: schedule: - cron: 0 1 * * * push: branches: - main jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: registry: gitea.gnilebein.de username: ${{ gitea.repository_owner }} password: ${{ secrets.REG_GITEA_PASSWORD }} - name: Get Meta id: meta run: | echo 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) | tee -a $GITHUB_OUTPUT echo IMAGE_CREATED=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | tee -a $GITHUB_OUTPUT - run: pwd - run: ls -lah - name: Build and push uses: docker/build-push-action@v6 with: context: ./StableV2 file: StableV2/Dockerfile pull: false push: true no-cache: true build-args: | VERSION=${{ steps.meta.outputs.VERSION }} IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }} tags: | ${{ vars.DOCKER_REPO }}/${{ gitea.repository_owner }}/${{ vars.IMAGE_NAME }} ${{ vars.DOCKER_REPO }}/${{ gitea.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ steps.meta.outputs.VERSION }}