Skip to content

Commit 74b9814

Browse files
Release v0.4.1
1 parent 50fda55 commit 74b9814

File tree

5 files changed

+6
-59
lines changed

5 files changed

+6
-59
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.4.1/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
# ratherthan 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.app_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.4.1
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 & 41 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
# ratherthan 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,19 +66,14 @@ jobs:
7066
uses: actions/checkout@v4
7167
with:
7268
submodules: true
73-
7469
- name: Install musl-tools
7570
run: sudo apt-get install musl-tools --no-install-recommends
76-
7771
- name: Update Rust toolchain
7872
run: rustup update
79-
8073
- name: Install Rust linux-musl target
8174
run: rustup target add x86_64-unknown-linux-musl
82-
8375
- name: Rust cache
8476
uses: Swatinem/[email protected]
85-
8677
# the version of `libcnb-cargo` installed here is kept in sync with the version of `libcnb-package`
8778
# that the release automation CLI tooling depends on
8879
- name: Install libcnb-cargo
@@ -93,25 +84,20 @@ jobs:
9384
| yq -ptoml -oyaml '.package[] | select(.name == "libcnb-package") | .version' \
9485
)
9586
cargo install --locked "libcnb-cargo@${LIBCNB_PACKAGE_VERSION}"
96-
9787
- name: Install Languages CLI
98-
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main
88+
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@v0.4.1
9989
with:
10090
branch: ${{ inputs.languages_cli_branch }}
10191
update_rust_toolchain: false
102-
10392
- name: Package buildpacks
10493
id: libcnb-package
10594
run: cargo libcnb package --release --package-dir ${{ env.PACKAGE_DIR }}
106-
10795
- name: Generate buildpack matrix
10896
id: generate-buildpack-matrix
10997
run: actions generate-buildpack-matrix --package-dir ${{ env.PACKAGE_DIR }}
110-
11198
- name: Generate changelog
11299
id: generate-changelog
113100
run: actions generate-changelog --version ${{ steps.generate-buildpack-matrix.outputs.version }}
114-
115101
- name: Temporary fix for bash-based buildpacks
116102
run: |
117103
buildpacks='${{ steps.generate-buildpack-matrix.outputs.buildpacks }}'
@@ -149,13 +135,11 @@ jobs:
149135
fi
150136
done
151137
done
152-
153138
- name: Cache buildpacks
154139
uses: actions/cache/save@v4
155140
with:
156141
key: ${{ github.run_id }}-compiled-buildpacks
157142
path: ${{ env.PACKAGE_DIR }}
158-
159143
publish-docker:
160144
name: Publish → Docker - ${{ matrix.buildpack_id }}
161145
needs: [compile]
@@ -173,31 +157,25 @@ jobs:
173157
path: ${{ env.PACKAGE_DIR }}
174158
env:
175159
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
176-
177160
- name: Install Pack CLI
178161
uses: buildpacks/github-actions/[email protected]
179-
180162
- name: Create Docker Image
181163
run: pack buildpack package ${{ matrix.buildpack_id }} --config ${{ matrix.buildpack_output_dir }}/package.toml -v
182-
183164
- name: Login to Docker Hub
184165
if: inputs.dry_run == false
185166
uses: docker/[email protected]
186167
with:
187168
registry: docker.io
188169
username: ${{ secrets.docker_hub_user }}
189170
password: ${{ secrets.docker_hub_token }}
190-
191171
- name: Check if version is already on Docker Hub
192172
id: check
193173
run: echo "published_to_docker=$(docker manifest inspect "${{ matrix.docker_repository }}:${{ matrix.buildpack_version }}" &> /dev/null && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
194-
195174
- name: Tag and publish buildpack
196175
if: inputs.dry_run == false && steps.check.outputs.published_to_docker == 'false'
197176
run: |
198177
docker tag ${{ matrix.buildpack_id }} ${{ matrix.docker_repository }}:${{ matrix.buildpack_version }}
199178
docker push ${{ matrix.docker_repository }}:${{ matrix.buildpack_version }}
200-
201179
publish-github:
202180
name: Publish → GitHub Release
203181
needs: [compile]
@@ -211,31 +189,26 @@ jobs:
211189
path: ${{ env.PACKAGE_DIR }}
212190
env:
213191
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
214-
215192
- name: Install Pack CLI
216193
uses: buildpacks/github-actions/[email protected]
217-
218194
- name: Generate CNB files
219195
run: |
220196
for buildpack in $(jq --exit-status -c '.[]' <<< '${{ needs.compile.outputs.buildpacks }}'); do
221197
artifact_prefix=$(jq --exit-status -r '.buildpack_artifact_prefix' <<< "${buildpack}")
222198
output_dir=$(jq --exit-status -r '.buildpack_output_dir' <<< "${buildpack}")
223199
pack buildpack package "${artifact_prefix}.cnb" --config "${output_dir}/package.toml" --format file --verbose
224200
done
225-
226201
- name: Get token for GitHub application (Linguist)
227202
uses: heroku/use-app-token-action@main
228203
id: generate-token
229204
with:
230205
app_id: ${{ inputs.app_id }}
231206
private_key: ${{ secrets.app_private_key }}
232-
233207
- name: Check if release exists
234208
id: check
235209
env:
236210
GH_TOKEN: ${{ steps.generate-token.outputs.app_token }}
237211
run: echo "published_to_github=$(gh release view v${{ needs.compile.outputs.version }} -R ${{ github.repository }} &> /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT
238-
239212
- name: Create GitHub Release
240213
if: inputs.dry_run == false && steps.check.outputs.published_to_github == 'false'
241214
uses: softprops/[email protected]
@@ -245,7 +218,6 @@ jobs:
245218
body: ${{ needs.compile.outputs.changelog }}
246219
files: "*.cnb"
247220
fail_on_unmatched_files: true
248-
249221
publish-cnb:
250222
name: Publish → CNB Registry - ${{ matrix.buildpack_id }}
251223
needs: [compile, publish-docker]
@@ -257,7 +229,6 @@ jobs:
257229
steps:
258230
- name: Install crane
259231
uses: buildpacks/github-actions/[email protected]
260-
261232
- name: Check if version is already in the registry
262233
id: check
263234
run: |
@@ -267,11 +238,9 @@ jobs:
267238
else
268239
echo "published_to_cnb_registry=false" >> $GITHUB_OUTPUT
269240
fi
270-
271241
- name: Calculate the buildpack image digest
272242
id: digest
273243
run: echo "value=$(crane digest ${{ matrix.docker_repository }}:${{ matrix.buildpack_version }})" >> "$GITHUB_OUTPUT"
274-
275244
- name: Register the new version with the CNB Buildpack Registry
276245
if: inputs.dry_run == false && steps.check.outputs.published_to_cnb_registry == 'false'
277246
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.5.1
@@ -280,7 +249,6 @@ jobs:
280249
id: ${{ matrix.buildpack_id }}
281250
version: ${{ matrix.buildpack_version }}
282251
address: ${{ matrix.docker_repository }}@${{ steps.digest.outputs.value }}
283-
284252
update-builder:
285253
name: Update Builder
286254
needs: [compile, publish-docker, publish-cnb, publish-github]
@@ -292,12 +260,10 @@ jobs:
292260
with:
293261
app_id: ${{ inputs.app_id }}
294262
private_key: ${{ secrets.app_private_key }}
295-
296263
- name: Checkout
297264
uses: actions/checkout@v4
298265
with:
299266
path: ./buildpacks
300-
301267
- name: Checkout cnb-builder-images repository
302268
uses: actions/checkout@v4
303269
with:
@@ -306,22 +272,18 @@ jobs:
306272
# Using the GH application token here will configure the local git config for this repo with credentials
307273
# that can be used to make signed commits that are attributed to the GH application user
308274
token: ${{ steps.generate-token.outputs.app_token }}
309-
310275
- name: Install crane
311276
uses: buildpacks/github-actions/[email protected]
312-
313277
- name: Install Languages CLI
314-
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main
278+
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@v0.4.1
315279
with:
316280
branch: ${{ inputs.languages_cli_branch }}
317-
318281
- name: Update Builder
319282
# The dry run check is performed here because the update process requires a published
320283
# image to exist in order to calculate a digest with `crane`. Adding the check here
321284
# means no files will be modified and so no PR will be created later.
322285
if: inputs.dry_run == false
323286
run: actions update-builder --repository-path ./buildpacks --builder-repository-path ./cnb-builder-images --builders builder-20,builder-22,builder-classic-22,buildpacks-20,salesforce-functions
324-
325287
- name: Create Pull Request
326288
id: pr
327289
uses: peter-evans/[email protected]
@@ -339,7 +301,6 @@ jobs:
339301
# This will ensure commits made from this workflow are attributed to the GH application user
340302
committer: ${{ inputs.app_username }} <${{ inputs.app_email }}>
341303
author: ${{ inputs.app_username }} <${{ inputs.app_email }}>
342-
343304
- name: Configure PR
344305
if: steps.pr.outputs.pull-request-operation == 'created'
345306
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.4.1"
88
publish = false
99

1010
[[bin]]

0 commit comments

Comments
 (0)