diff --git a/.github/workflows/build-and-push-on-tag.yaml b/.github/workflows/build-and-push-on-tag.yaml new file mode 100644 index 0000000..7521441 --- /dev/null +++ b/.github/workflows/build-and-push-on-tag.yaml @@ -0,0 +1,27 @@ +--- + name: Build and push Docker Image on Tag + + on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9].*' + jobs: + pre_build: + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.tag.outputs.tag }} + suffix: ${{ steps.tag.outputs.suffix }} + steps: + - name: Filter Tag name + uses: olegtarasov/get-tag@v2.1 + id: tag + with: + tagRegex: "(?[0-9]+.[0-9]+.[0-9])(?.*)" + build_and_push: + needs: pre_build + uses: hpi-schul-cloud/infra-tools/.github/workflows/build-and-push.yaml@master + with: + registry: ghcr.io + image: dbildungsplattform/cachet + tag: ${{ needs.pre_build.outputs.tag }} + suffix: ${{ needs.pre_build.outputs.suffix }} \ No newline at end of file