diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push-release.yaml similarity index 75% rename from .github/workflows/build-push.yaml rename to .github/workflows/build-push-release.yaml index b0a910bf8..748f1a2b6 100644 --- a/.github/workflows/build-push.yaml +++ b/.github/workflows/build-push-release.yaml @@ -6,96 +6,104 @@ on: paths-ignore: - 'docs/**' - 'examples/**' + tags: + - '^v?\d+\.\d+\.\d+(?:-.*)?$' permissions: id-token: write # This is required for requesting the JWT token contents: read # This is required for actions/checkout jobs: - compute-tag: + compute-tags: runs-on: ubuntu-latest outputs: - tag: ${{ steps.get_tag.outputs.TAG }} + tags: ${{ steps.get_tag.outputs.TAGS }} steps: - name: Checkout uses: actions/checkout@v4 - name: Get the latest tag id: get_tag - run: echo ::set-output name=TAG::${{ github.sha }} + run: | + { + echo 'TAGS<> "$GITHUB_OUTPUT" build-operator: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: serverless-operator dockerfile: components/operator/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-serverless-controller: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-controller dockerfile: components/serverless/deploy/manager/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-serverless-webhook: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-webhook dockerfile: components/serverless/deploy/webhook/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-serverless-jobinit: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-build-init dockerfile: components/serverless/deploy/jobinit/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-nodejs18: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-runtime-nodejs18 dockerfile: nodejs18/Dockerfile context: components/runtimes/nodejs - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-nodejs20: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-runtime-nodejs20 dockerfile: nodejs20/Dockerfile context: components/runtimes/nodejs - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-python39: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-runtime-python39 dockerfile: python39/Dockerfile context: components/runtimes/python - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-python312: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-runtime-python312 dockerfile: python312/Dockerfile context: components/runtimes/python - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} build-java17: - needs: compute-tag + needs: compute-tags uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-runtime-java17-jvm-alpha dockerfile: Dockerfile-jvm-runtime context: components/runtimes/java17 - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tags.outputs.tags }} diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml deleted file mode 100644 index 50c4febe6..000000000 --- a/.github/workflows/build-release.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: release serverless build -on: - push: - tags: - - '^v?\d+\.\d+\.\d+(?:-.*)?$' -permissions: - id-token: write # This is required for requesting the JWT token - contents: read # This is required for actions/checkout - -jobs: - compute-tag: - runs-on: ubuntu-latest - outputs: - tag: ${{ steps.get_tag.outputs.TAG }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Get the latest tag - id: get_tag - run: echo ::set-output name=TAG::${{ github.sha }} - - build-operator: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: serverless-operator - dockerfile: components/operator/Dockerfile - build-arg: PURPOSE=release - tags: ${{ needs.compute-tag.outputs.tag }} - - build-serverless-controller: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-controller - dockerfile: components/serverless/deploy/manager/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} - - build-serverless-webhook: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-webhook - dockerfile: components/serverless/deploy/webhook/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} - - build-serverless-jobinit: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-build-init - dockerfile: components/serverless/deploy/jobinit/Dockerfile - tags: ${{ needs.compute-tag.outputs.tag }} - - build-nodejs18: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-runtime-nodejs18 - dockerfile: nodejs18/Dockerfile - context: components/runtimes/nodejs - tags: ${{ needs.compute-tag.outputs.tag }} - - build-nodejs20: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-runtime-nodejs20 - dockerfile: nodejs20/Dockerfile - context: components/runtimes/nodejs - tags: ${{ needs.compute-tag.outputs.tag }} - - build-python39-legacy: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-runtime-python39 - dockerfile: python39/Dockerfile - context: components/runtimes/python - tags: ${{ needs.compute-tag.outputs.tag }} - - build-python39: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-runtime-python39 - dockerfile: python39/Dockerfile - context: components/runtimes/python - tags: ${{ needs.compute-tag.outputs.tag }} - - build-python312: - needs: compute-tag - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: function-runtime-python312 - dockerfile: python312/Dockerfile - context: components/runtimes/python - tags: ${{ needs.compute-tag.outputs.tag }}