diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 1271c4e..d15cea2 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -23,21 +23,21 @@ jobs: with: fetch-depth: 0 # Required for version detection - - name: Get version from tag - id: version - uses: actions/github-script@v6 - with: - script: | - const tag = process.env.GITHUB_REF?.replace('refs/tags/v', ''); - return tag || 'latest'; - - - name: Set up semantic versioning - id: semver - uses: mathieudutour/github-tag-action@v6 + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} default_bump: patch - tag_prefix: 'v' + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_version.outputs.new_tag }} + release_name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} - name: Log in to the Container registry uses: docker/login-action@v2 @@ -52,8 +52,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=${{ steps.version.outputs.result }} - type=raw,value=${{ steps.semver.outputs.new_tag }} + type=raw,value=${{ steps.tag_version.outputs.new_tag }} type=raw,value=latest - name: Build and push Docker image