From 8599580c3a332ad57c9ecf7c32181e0896271e98 Mon Sep 17 00:00:00 2001 From: MichalKalke Date: Tue, 9 Jul 2024 10:21:02 +0200 Subject: [PATCH] Add serverless runtimes build (push) --- .../serverless-build-runtime-push.yaml | 69 +++++++++++++++++++ ...ml => serverless-build-runtimes-pull.yaml} | 2 +- .../serverless-operator-build-push.yaml | 6 +- 3 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/serverless-build-runtime-push.yaml rename .github/workflows/{serverless-build-runtimes.yaml => serverless-build-runtimes-pull.yaml} (97%) diff --git a/.github/workflows/serverless-build-runtime-push.yaml b/.github/workflows/serverless-build-runtime-push.yaml new file mode 100644 index 000000000..b83c86f94 --- /dev/null +++ b/.github/workflows/serverless-build-runtime-push.yaml @@ -0,0 +1,69 @@ +name: serverless runtimes build (push) + +on: + push: + branches: [ "main", "release-*" ] + paths-ignore: + - 'docs/**' + - 'examples/**' + +permissions: + id-token: write + contents: read + +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-image-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/ga + dockerfile: nodejs18/Dockerfile + context: components/runtimes/nodejs + tags: ${{ needs.compute-tag.outputs.tag }} + + build-image-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/ga + dockerfile: nodejs20/Dockerfile + context: components/runtimes/nodejs + tags: ${{ needs.compute-tag.outputs.tag }} + + build-image-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/ga + dockerfile: python39/Dockerfile + context: components/runtimes/python + tags: ${{ needs.compute-tag.outputs.tag }} + + build-image-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/ga + dockerfile: python312/Dockerfile + context: components/runtimes/python + tags: ${{ needs.compute-tag.outputs.tag }} + + build-image-java17: + 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-java17-jvm-alpha/ga + dockerfile: Dockerfile-jvm-runtime + context: components/runtimes/java17 + tags: ${{ needs.compute-tag.outputs.tag }} diff --git a/.github/workflows/serverless-build-runtimes.yaml b/.github/workflows/serverless-build-runtimes-pull.yaml similarity index 97% rename from .github/workflows/serverless-build-runtimes.yaml rename to .github/workflows/serverless-build-runtimes-pull.yaml index 9f33ad285..6de9a1bd4 100644 --- a/.github/workflows/serverless-build-runtimes.yaml +++ b/.github/workflows/serverless-build-runtimes-pull.yaml @@ -1,4 +1,4 @@ -name: pull-serverless-runtimes-build +name: serverless runtimes build (pull) on: pull_request_target: diff --git a/.github/workflows/serverless-operator-build-push.yaml b/.github/workflows/serverless-operator-build-push.yaml index 86cb3411d..bc1200cdd 100644 --- a/.github/workflows/serverless-operator-build-push.yaml +++ b/.github/workflows/serverless-operator-build-push.yaml @@ -3,6 +3,9 @@ name: serverless operator build (push) on: push: branches: [ "main", "release-*" ] + paths-ignore: + - 'docs/**' + - 'examples/**' permissions: id-token: write @@ -15,8 +18,7 @@ jobs: tag: ${{ steps.get_tag.outputs.TAG }} steps: - name: Checkout - uses: actions/checkout@v2 - + uses: actions/checkout@v4 - name: Get the latest tag id: get_tag run: echo ::set-output name=TAG::${{ github.sha }}