diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 798873e..74fc10c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,8 @@ jobs: auto-tag: needs: gradle - runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version_info.outputs.new_version }} timeout-minutes: 15 if: github.event_name == 'repository_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || (github.event_name == 'push' && needs.gradle.outputs.success == 'true') permissions: @@ -143,12 +144,9 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ secrets.DOCKERHUB_USERNAME }}/openid-federation-server - strip.prefix: true tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=ref,event=tag - type=match,pattern=v(.*)-.*\..+,group=1 - type=match,pattern=v(\d+\.\d+)\..*,group=1 + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ needs.auto-tag.outputs.version }} - name: Build and push federation-server uses: docker/build-push-action@v5 @@ -170,12 +168,9 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ secrets.DOCKERHUB_USERNAME }}/openid-federation-admin-server - strip.prefix: true tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=ref,event=tag - type=match,pattern=v(.*)-.*\..+,group=1 - type=match,pattern=v(\d+\.\d+)\..*,group=1 + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ needs.auto-tag.outputs.version }} - name: Build and push admin-server uses: docker/build-push-action@v5 diff --git a/build.gradle.kts b/build.gradle.kts index a3e3c2e..db0736b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -39,7 +39,7 @@ fun getNpmVersion(): String { allprojects { group = "com.sphereon.oid.fed" - version = "0.2.19-SNAPSHOT" + version = "0.2.20-SNAPSHOT" val npmVersion by extra { getNpmVersion() } // Common repository configuration for all projects