name: CD on: push: branches: - main paths: - "go.mod" - "go.sum" - "**/*.go" - "Dockerfile" - "Makefile" pull_request: branches: - main workflow_dispatch: env: DOCKER_REGISTRY: gitea.t000-n.de jobs: create_tag: name: Create tag runs-on: ubuntu-latest outputs: tag: ${{ steps.tag.outputs.new-tag }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@ef0c23189db33220a73022d8c29a27709d0df440 # 0.1.32 id: tag with: token: ${{ secrets.GITEA_TOKEN }} prerelease: ${{ github.event_name == 'workflow_dispatch' }} - run: | git tag ${{ steps.tag.outputs.new-tag }} git push origin ${{ steps.tag.outputs.new-tag }} - name: Set output run: | echo "tag=${{ steps.tag.outputs.new-tag }}" >> $GITHUB_OUTPUT build_and_push_image: needs: create_tag uses: https://gitea.t000-n.de/t.behrendt/gitea-workflows/.gitea/workflows/build-container.yaml@0.1.1 with: registry: gitea.t000-n.de/t.behrendt registry-user: ${{ secrets.REGISTRY_USER }} registry-password: ${{ secrets.REGISTRY_PASSWORD }} repo-name: authentik-kubernetes-operator tag: ${{ needs.create_tag.outputs.tag }}