diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 6e0f6b0f..c5fdfe88 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - builder: ["buildpacks-20", "builder-classic-22", "builder-22"] + builder: ["buildpacks-20", "builder-classic-22", "builder-22", "salesforce-functions"] steps: - name: Checkout uses: actions/checkout@v3 @@ -32,9 +32,11 @@ jobs: # We manually compress the archive rather than relying upon actions/cache's compression, since # it ends up being faster both in this job and also later when the images are consumed. - name: Export Docker images from the Docker daemon - env: - BUILDER: ${{ matrix.builder }} - run: docker save ${{ matrix.builder }} heroku/heroku:${BUILDER##*-}-cnb | zstd -T0 --long=31 -o images.tar.zst + # Using sed rather than yq until this yq bug is fixed: + # https://github.com/mikefarah/yq/issues/1758 + run: | + RUN_IMAGE_TAG=$(sed --quiet --regexp-extended --expression 's/run-image\s*=\s*"(.+)"/\1/p' ${{ matrix.builder }}/builder.toml) + docker save ${{ matrix.builder }} ${RUN_IMAGE_TAG} | zstd -T0 --long=31 -o images.tar.zst # We use a cache here rather than artifacts because it's 4x faster and we # don't need the builder archive outside of this workflow run anyway. - name: Save Docker images to the cache @@ -95,7 +97,7 @@ jobs: strategy: fail-fast: false matrix: - builder: ["builder-22"] + builder: ["builder-22", "salesforce-functions"] language: ["java", "javascript", "typescript"] steps: - name: Checkout @@ -145,6 +147,8 @@ jobs: - builder: builder-22 tag_public: heroku/builder:22 tag_private: heroku-22:builder + - builder: salesforce-functions + tag_private: heroku-22:builder-functions steps: - name: Restore Docker images from the cache uses: actions/cache/restore@v3 diff --git a/salesforce-functions/builder.toml b/salesforce-functions/builder.toml new file mode 100644 index 00000000..5b864ee0 --- /dev/null +++ b/salesforce-functions/builder.toml @@ -0,0 +1,27 @@ +description = "Internal builder image for Salesforce Functions" + +[stack] +id = "heroku-22" +build-image = "heroku/heroku:22-cnb-build" +run-image = "heroku/heroku:22-cnb" + +[lifecycle] +version = "0.17.1" + +[[buildpacks]] + id = "heroku/java-function" + uri = "docker://docker.io/heroku/buildpack-java-function@sha256:4cbe8d4984f70fc63e6b0fcea1b904d4246d90bbe0b9cc10ba8b73c98eda3b00" + +[[buildpacks]] + id = "heroku/nodejs-function" + uri = "docker://docker.io/heroku/buildpack-nodejs-function@sha256:69d61df4e1805055fcf2911e75f5fed59b02292f2bda7c78b6f891e8d8cd00f3" + +[[order]] + [[order.group]] + id = "heroku/nodejs-function" + version = "1.1.6" + +[[order]] + [[order.group]] + id = "heroku/java-function" + version = "3.2.0"