diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 47819ed..d97fdef 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,6 +1,12 @@ name: Build and Push Docker Image run-name: Build and Push Docker Image on: + workflow_run: + workflows: ["Release"] + types: + - completed + branches: + - main push: branches: - main @@ -11,6 +17,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Extract tag + run: | + TAG=$(git describe --tags --abbrev=0) + echo "TAG=$TAG" >> $GITHUB_ENV - uses: actions/setup-node@v5 with: node-version: 24 @@ -34,4 +46,4 @@ jobs: file: ./Dockerfile push: true tags: | - git.kjan.de/templates/react + git.kjan.de/templates/react:${{ gitea.event_name == 'workflow_run' && env.tag || 'dev' }}