Skip to content

Commit ffcca1c

Browse files
Release v0.8.7
1 parent 29a6e63 commit ffcca1c

File tree

5 files changed

+6
-61
lines changed

5 files changed

+6
-61
lines changed

.github/actions/install-languages-cli/action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Install Languages CLI
22
description: Downloads the Languages CLI from a known release or installs using Cargo
3-
43
inputs:
54
branch:
65
# This input is currently the only way we can modify which branch to install the CLI tooling from. Ideally we
@@ -13,25 +12,22 @@ inputs:
1312
download_url:
1413
required: false
1514
description: The url to download the CLI binary from
16-
default: ""
15+
default: "https://github.com/heroku/languages-github-actions/releases/download/v0.8.7/actions.tar.gz"
1716
update_rust_toolchain:
1817
required: false
1918
description: Should we run `rustup update` as part of this composite action?
2019
default: "true"
21-
2220
runs:
2321
using: composite
2422
steps:
2523
- name: Update Rust toolchain
2624
shell: bash
2725
if: inputs.update_rust_toolchain == 'true' && inputs.download_url == ''
2826
run: rustup update
29-
3027
- name: Build actions binary
3128
shell: bash
3229
if: inputs.download_url == ''
3330
run: cargo install --locked --git https://github.com/heroku/languages-github-actions.git --branch ${{ inputs.branch }}
34-
3531
- name: Download actions binary
3632
shell: bash
3733
if: inputs.download_url != ''

.github/workflows/_buildpacks-prepare-release.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: _buildpacks-prepare-release
2-
32
on:
43
workflow_call:
54
inputs:
@@ -41,17 +40,14 @@ on:
4140
app_private_key:
4241
description: Private key of GitHub application (Linguist)
4342
required: true
44-
4543
defaults:
4644
run:
4745
# Setting an explicit bash shell ensures GitHub Actions enables pipefail mode too,
4846
# rather than only error on exit (improving failure UX when pipes are used). See:
4947
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
5048
shell: bash
51-
5249
env:
5350
CARGO_TERM_COLOR: always
54-
5551
jobs:
5652
prepare-release:
5753
name: Prepare Release
@@ -63,31 +59,26 @@ jobs:
6359
with:
6460
app-id: ${{ inputs.app_id }}
6561
private-key: ${{ secrets.app_private_key }}
66-
6762
- name: Checkout
6863
uses: actions/checkout@v4
6964
with:
7065
# Using the GH application token here will configure the local git config for this repo with credentials
7166
# that can be used to make signed commits that are attributed to the GH application user
7267
token: ${{ steps.generate-token.outputs.token }}
73-
7468
- name: Install Languages CLI
75-
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main
69+
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@v0.8.7
7670
with:
7771
branch: ${{ inputs.languages_cli_branch }}
78-
7972
- name: Bump versions and update changelogs
8073
id: prepare
8174
run: |
8275
actions prepare-release \
8376
--bump ${{ inputs.bump }} \
8477
--repository-url https://github.com/${{ github.repository }} \
8578
${{ inputs.declarations_starting_version && format('--declarations-starting-version {0}', inputs.declarations_starting_version) }}
86-
8779
- name: Generate changelog
8880
id: generate-changelog
8981
run: actions generate-changelog --version ${{ steps.prepare.outputs.to_version }}
90-
9182
- name: Create pull request
9283
id: pr
9384
uses: peter-evans/[email protected]
@@ -104,7 +95,6 @@ jobs:
10495
# This will ensure commits made from this workflow are attributed to the GH application user
10596
committer: ${{ inputs.app_username }} <${{ inputs.app_email }}>
10697
author: ${{ inputs.app_username }} <${{ inputs.app_email }}>
107-
10898
- name: Configure pull request
10999
if: steps.pr.outputs.pull-request-operation == 'created'
110100
run: gh pr merge --auto --squash "${{ steps.pr.outputs.pull-request-number }}"

.github/workflows/_buildpacks-release.yml

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: _buildpacks-release
2-
32
on:
43
workflow_call:
54
inputs:
@@ -45,18 +44,15 @@ on:
4544
docker_hub_token:
4645
required: true
4746
description: The token to login to Docker Hub with
48-
4947
defaults:
5048
run:
5149
# Setting an explicit bash shell ensures GitHub Actions enables pipefail mode too,
5250
# rather than only error on exit (improving failure UX when pipes are used). See:
5351
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
5452
shell: bash
55-
5653
env:
5754
CARGO_TERM_COLOR: always
5855
PACKAGE_DIR: ./packaged
59-
6056
jobs:
6157
compile:
6258
name: Compile Buildpacks
@@ -70,20 +66,16 @@ jobs:
7066
uses: actions/checkout@v4
7167
with:
7268
submodules: true
73-
7469
- name: Install Languages CLI
75-
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main
70+
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@v0.8.7
7671
with:
7772
branch: ${{ inputs.languages_cli_branch }}
7873
update_rust_toolchain: false
79-
8074
- name: Generate buildpack matrix
8175
id: generate-buildpack-matrix
8276
run: actions generate-buildpack-matrix --temporary-id "${{ github.run_id }}" --package-dir "${{ env.PACKAGE_DIR }}"
83-
8477
- name: Update Rust toolchain
8578
run: rustup update
86-
8779
- name: Install cross-compile tooling
8880
env:
8981
RUST_TRIPLES: ${{ steps.generate-buildpack-matrix.outputs.rust_triples }}
@@ -96,10 +88,8 @@ jobs:
9688
fi
9789
rustup target add "$triple"
9890
done
99-
10091
- name: Rust cache
10192
uses: Swatinem/[email protected]
102-
10393
# the version of `libcnb-cargo` installed here is kept in sync with the version of `libcnb-package`
10494
# that the release automation CLI tooling depends on
10595
- name: Install libcnb-cargo
@@ -110,7 +100,6 @@ jobs:
110100
| yq -ptoml -oyaml '.package[] | select(.name == "libcnb-package") | .version' \
111101
)
112102
cargo install --locked "libcnb-cargo@${LIBCNB_PACKAGE_VERSION}"
113-
114103
- name: Package buildpacks
115104
id: libcnb-package
116105
env:
@@ -134,17 +123,14 @@ jobs:
134123
cargo libcnb package --release --package-dir "${package_dir}" --target "${triple}"
135124
done
136125
done
137-
138126
- name: Generate changelog
139127
id: generate-changelog
140128
run: actions generate-changelog --version ${{ steps.generate-buildpack-matrix.outputs.version }}
141-
142129
- name: Cache buildpacks
143130
uses: actions/cache/save@v4
144131
with:
145132
key: ${{ github.run_id }}-compiled-buildpacks
146133
path: ${{ env.PACKAGE_DIR }}
147-
148134
publish-docker:
149135
name: Publish → Docker - ${{ matrix.buildpack_id }}
150136
needs: [compile]
@@ -163,7 +149,6 @@ jobs:
163149
uses: actions/checkout@v4
164150
with:
165151
submodules: true
166-
167152
- name: Restore buildpacks
168153
uses: actions/cache/restore@v4
169154
with:
@@ -172,24 +157,19 @@ jobs:
172157
path: ${{ env.PACKAGE_DIR }}
173158
env:
174159
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
175-
176160
- name: Install Pack CLI
177161
uses: buildpacks/github-actions/[email protected]
178-
179162
- name: Install Crane
180163
uses: buildpacks/github-actions/[email protected]
181-
182164
- name: Login to Docker Hub
183165
uses: docker/[email protected]
184166
with:
185167
registry: docker.io
186168
username: ${{ secrets.docker_hub_user }}
187169
password: ${{ secrets.docker_hub_token }}
188-
189170
- name: Check if version is already on Docker Hub
190171
id: check
191172
run: echo "published_to_docker=$(docker manifest inspect "${{ matrix.stable_tag }}" &> /dev/null && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
192-
193173
- name: Publish to temporary tags
194174
if: steps.check.outputs.published_to_docker == 'false'
195175
env:
@@ -225,7 +205,6 @@ jobs:
225205
digest=$(crane digest "${{ matrix.temporary_tag }}")
226206
echo -e "- \`${{ matrix.temporary_tag }}\`\n - \`${digest}\`" >> $GITHUB_STEP_SUMMARY
227207
fi
228-
229208
- name: Promote temporary tags to stable tags
230209
if: inputs.dry_run == false && steps.check.outputs.published_to_docker == 'false'
231210
env:
@@ -242,7 +221,6 @@ jobs:
242221
# promote primary image manifest or manifest list to permanent tag
243222
crane copy "${{ matrix.temporary_tag }}" "${{ matrix.stable_tag }}"
244223
echo "- \`${{ matrix.stable_tag }}\`" >> $GITHUB_STEP_SUMMARY
245-
246224
- name: Unpublish temp tags from this run
247225
if: always()
248226
env:
@@ -272,7 +250,6 @@ jobs:
272250
fi
273251
done
274252
exit $status
275-
276253
publish-github:
277254
name: Publish → GitHub Release
278255
needs: [compile]
@@ -288,7 +265,6 @@ jobs:
288265
uses: actions/checkout@v4
289266
with:
290267
submodules: true
291-
292268
- name: Restore buildpacks
293269
uses: actions/cache/restore@v4
294270
with:
@@ -297,10 +273,8 @@ jobs:
297273
path: ${{ env.PACKAGE_DIR }}
298274
env:
299275
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
300-
301276
- name: Install Pack CLI
302277
uses: buildpacks/github-actions/[email protected]
303-
304278
- name: Generate CNB files
305279
run: |
306280
for buildpack in $(jq --exit-status -c '.[]' <<< '${{ needs.compile.outputs.buildpacks }}'); do
@@ -311,20 +285,17 @@ jobs:
311285
pack buildpack package "$cnb_file" --target "${oci_target}" --config "${output_dir}/package.toml" --format file --verbose
312286
done
313287
done
314-
315288
- name: Get token for GitHub application (Linguist)
316289
uses: actions/create-github-app-token@v1
317290
id: generate-token
318291
with:
319292
app-id: ${{ inputs.app_id }}
320293
private-key: ${{ secrets.app_private_key }}
321-
322294
- name: Check if release exists
323295
id: check
324296
env:
325297
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
326298
run: echo "published_to_github=$(gh release view v${{ needs.compile.outputs.version }} -R ${{ github.repository }} &> /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT
327-
328299
- name: Create GitHub Release
329300
if: inputs.dry_run == false && steps.check.outputs.published_to_github == 'false'
330301
uses: softprops/[email protected]
@@ -334,7 +305,6 @@ jobs:
334305
body: ${{ needs.compile.outputs.changelog }}
335306
files: "*.cnb"
336307
fail_on_unmatched_files: true
337-
338308
publish-cnb-registry:
339309
name: Publish → CNB Registry - ${{ matrix.buildpack_id }}
340310
needs: [compile, publish-docker]
@@ -346,7 +316,6 @@ jobs:
346316
steps:
347317
- name: Install crane
348318
uses: buildpacks/github-actions/[email protected]
349-
350319
- name: Check if version is already in the registry
351320
id: check
352321
run: |
@@ -356,11 +325,9 @@ jobs:
356325
else
357326
echo "published_to_cnb_registry=false" >> $GITHUB_OUTPUT
358327
fi
359-
360328
- name: Calculate the buildpack image digest
361329
id: digest
362330
run: echo "value=$(crane digest ${{ matrix.stable_tag }})" >> "$GITHUB_OUTPUT"
363-
364331
- name: Register the new version with the CNB Buildpack Registry
365332
if: inputs.dry_run == false && steps.check.outputs.published_to_cnb_registry == 'false'
366333
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.7.4
@@ -369,7 +336,6 @@ jobs:
369336
id: ${{ matrix.buildpack_id }}
370337
version: ${{ matrix.buildpack_version }}
371338
address: ${{ matrix.image_repository }}@${{ steps.digest.outputs.value }}
372-
373339
update-builder:
374340
name: Update Builder
375341
needs: [compile, publish-docker, publish-cnb-registry, publish-github]
@@ -383,12 +349,10 @@ jobs:
383349
private-key: ${{ secrets.app_private_key }}
384350
owner: heroku
385351
repositories: cnb-builder-images
386-
387352
- name: Checkout
388353
uses: actions/checkout@v4
389354
with:
390355
path: ./buildpacks
391-
392356
- name: Checkout cnb-builder-images repository
393357
uses: actions/checkout@v4
394358
with:
@@ -397,22 +361,18 @@ jobs:
397361
# Using the GH application token here will configure the local git config for this repo with credentials
398362
# that can be used to make signed commits that are attributed to the GH application user
399363
token: ${{ steps.generate-token.outputs.token }}
400-
401364
- name: Install crane
402365
uses: buildpacks/github-actions/[email protected]
403-
404366
- name: Install Languages CLI
405-
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main
367+
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@v0.8.7
406368
with:
407369
branch: ${{ inputs.languages_cli_branch }}
408-
409370
- name: Update Builder
410371
# The dry run check is performed here because the update process requires a published
411372
# image to exist in order to calculate a digest with `crane`. Adding the check here
412373
# means no files will be modified and so no PR will be created later.
413374
if: inputs.dry_run == false
414375
run: actions update-builder --repository-path ./buildpacks --builder-repository-path ./cnb-builder-images --builders builder-20,builder-22,builder-24,salesforce-functions
415-
416376
- name: Create Pull Request
417377
id: pr
418378
uses: peter-evans/[email protected]
@@ -430,7 +390,6 @@ jobs:
430390
# This will ensure commits made from this workflow are attributed to the GH application user
431391
committer: ${{ inputs.app_username }} <${{ inputs.app_email }}>
432392
author: ${{ inputs.app_username }} <${{ inputs.app_email }}>
433-
434393
- name: Configure PR
435394
if: steps.pr.outputs.pull-request-operation == 'created'
436395
run: gh pr merge --auto --squash --repo heroku/cnb-builder-images "${{ steps.pr.outputs.pull-request-number }}"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rust-version = "1.75"
44
edition = "2021"
55
# This crate isn't published to crates.io, however, we still need the version field here,
66
# since it's updated to the real version as part of tagging/publishing to GitHub releases.
7-
version = "0.0.0"
7+
version = "0.8.7"
88
publish = false
99

1010
[[bin]]

0 commit comments

Comments
 (0)