Skip to content

Commit cf3c443

Browse files
Merge remote-tracking branch 'origin/main' into recover-secret
2 parents f0d9684 + b7b2114 commit cf3c443

14 files changed

+396
-746
lines changed

Diff for: .devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye@sha256:d09f487fd7a54fcac7a480a55667e397d425d9506da66ddb38afe628423b4f2d
1+
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye@sha256:d30cd145267e69e4033e01498ea13560dbb96c7d832a810c561907097f75735b
22

33
# [Optional] Uncomment this section to install additional packages.
44
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

Diff for: .github/workflows/build.yml

+48-61
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
fetch-depth: 0
8787

8888
- name: Cache dependencies
89-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
89+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
9090
env:
9191
CACHE_NAME: cargo-cache-dependencies
9292
with:
@@ -99,7 +99,7 @@ jobs:
9999
${{ runner.os }}-build-${{ env.CACHE_NAME }}-
100100
101101
- name: Set up mold
102-
uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
102+
uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
103103

104104
- name: Set up toolchain
105105
shell: bash
@@ -165,7 +165,7 @@ jobs:
165165
show-progress: false
166166

167167
- name: Cache dependencies
168-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
168+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
169169
env:
170170
CACHE_NAME: cargo-cache-dependencies
171171
with:
@@ -178,7 +178,7 @@ jobs:
178178
${{ runner.os }}-build-${{ env.CACHE_NAME }}-
179179
180180
- name: Set up mold
181-
uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
181+
uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
182182

183183
- name: Set up toolchain
184184
shell: bash
@@ -211,7 +211,7 @@ jobs:
211211
show-progress: false
212212

213213
- name: Cache dependencies
214-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
214+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
215215
env:
216216
CACHE_NAME: cargo-cache-dependencies
217217
with:
@@ -224,7 +224,7 @@ jobs:
224224
${{ runner.os }}-build-${{ env.CACHE_NAME }}-
225225
226226
- name: Set up mold
227-
uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
227+
uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
228228

229229
- name: Set up toolchain
230230
shell: bash
@@ -252,7 +252,7 @@ jobs:
252252
show-progress: false
253253

254254
- name: Cache dependencies
255-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
255+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
256256
env:
257257
CACHE_NAME: cargo-cache-dependencies
258258
with:
@@ -265,7 +265,7 @@ jobs:
265265
${{ runner.os }}-build-${{ env.CACHE_NAME }}-
266266
267267
- name: Set up mold
268-
uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
268+
uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
269269

270270
- name: Set up toolchain
271271
shell: bash
@@ -335,7 +335,7 @@ jobs:
335335
grcov $(find profiling -name "profile-*.profraw" -print) --source-dir . --binary-path ./target/debug/ --output-type lcov --branch --ignore-not-existing --llvm --keep-only "src/**" --keep-only "tests/**" --output-path ./reports/lcov.info
336336
337337
- name: Upload coverage results (to Codecov.io)
338-
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
338+
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
339339
with:
340340
disable_search: true
341341
fail_ci_if_error: true
@@ -378,7 +378,7 @@ jobs:
378378
show-progress: false
379379

380380
- name: Cache dependencies
381-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
381+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
382382
env:
383383
CACHE_NAME: cargo-cache-dependencies
384384
with:
@@ -391,7 +391,7 @@ jobs:
391391
${{ runner.os }}-build-${{ env.CACHE_NAME }}-
392392
393393
- name: Set up mold
394-
uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
394+
uses: rui314/setup-mold@8ec40be1d14871f7ce8fbf273c4b33f3ff75f1d1 # v1
395395

396396
- name: Set up toolchain
397397
shell: bash
@@ -410,7 +410,7 @@ jobs:
410410
args: --workspace --all-targets --all-features --no-deps
411411

412412
docker-build:
413-
name: Build Docker container for ${{ matrix.platform.docker }}-${{ matrix.platform.rust }}
413+
name: Build Docker container
414414
runs-on: ubuntu-latest
415415
needs:
416416
- calculate-version
@@ -419,34 +419,20 @@ jobs:
419419
env:
420420
APPLICATION_NAME: PLACEHOLDER # overridden in step 'Set application name', this is merely to satisfy the linter
421421
PATH_TO_TAR: PLACEHOLDER # same ^
422-
PLATFORM_PAIR: PLACEHOLDER # same ^
423-
PLATFORM_UNIQUE_TAG: PLACEHOLDER # same ^
424-
strategy:
425-
fail-fast: false
426-
matrix:
427-
platform:
428-
- docker: linux/amd64
429-
rust: x86_64-unknown-linux-musl
430-
- docker: linux/arm64
431-
rust: aarch64-unknown-linux-musl
422+
UNIQUE_TAG: PLACEHOLDER # same ^
432423
steps:
433424
- name: Checkout
434425
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
435426
with:
436427
show-progress: false
437428

438-
- name: Prepare name
439-
run: |
440-
platform=${{ matrix.platform.docker }}-${{ matrix.platform.rust }}
441-
echo "PLATFORM_PAIR=${platform//\//-}" >> ${GITHUB_ENV}
442-
443429
- name: Set the Cargo.toml version before we copy in the data into the Docker container
444430
shell: bash
445431
run: |
446432
./.github/scripts/update-version.sh ${{ needs.calculate-version.outputs.version }}
447433
448434
- name: Set up Docker Buildx
449-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
435+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
450436

451437
# TODO validate no changes between github.event.pull_request.head.sha and the actual current sha (representing the hypothetical merge)
452438

@@ -458,18 +444,18 @@ jobs:
458444
- name: Set Docker tag
459445
shell: bash
460446
run: |
461-
PLATFORM_UNIQUE_TAG=pr-${{ github.event.pull_request.base.sha }}-${{ github.event.pull_request.head.sha }}-${{ env.PLATFORM_PAIR }}
462-
echo "PLATFORM_UNIQUE_TAG=${PLATFORM_UNIQUE_TAG##*/}" >> ${GITHUB_ENV}
447+
UNIQUE_TAG=pr-${{ github.event.pull_request.base.sha }}-${{ github.event.pull_request.head.sha }}
448+
echo "UNIQUE_TAG=${UNIQUE_TAG##*/}" >> ${GITHUB_ENV}
463449
464450
# Extract metadata (tags, labels) for Docker
465451
# https://github.com/docker/metadata-action
466452
- name: Extract Docker metadata
467-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
453+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
468454
id: meta
469455
with:
470456
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
471457
tags: |
472-
type=raw,value=${{ env.PLATFORM_UNIQUE_TAG }}
458+
type=raw,value=${{ env.UNIQUE_TAG }}
473459
labels: |
474460
org.opencontainers.image.version=pr-${{ github.event.number }}
475461
org.opencontainers.image.source=${{ github.event.pull_request.html_url }}
@@ -488,45 +474,42 @@ jobs:
488474
echo "APPLICATION_NAME=${APPLICATION_NAME##*/}" >> ${GITHUB_ENV}
489475
490476
- name: Build Docker image
491-
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
477+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
492478
with:
493479
build-args: |
494480
APPLICATION_NAME=${{ env.APPLICATION_NAME }}
495-
TARGET=${{ matrix.platform.rust }}
496481
context: .
497482
# this container is THE PR's artifact, and we will re-tag it
498483
# once the PR has been accepted
499484
tags: ${{ steps.meta.outputs.tags }}
500485
labels: ${{ steps.meta.outputs.labels }}
501-
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ env.PLATFORM_PAIR }}
502-
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ env.PLATFORM_PAIR }},mode=max
503-
platforms: ${{ matrix.platform.docker }}
504-
outputs: type=docker,dest=/tmp/${{ env.PLATFORM_UNIQUE_TAG }}.tar
486+
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ env.APPLICATION_NAME }}
487+
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ env.APPLICATION_NAME }},mode=max
488+
platforms: linux/amd64, linux/arm64
489+
outputs: type=oci,dest=/tmp/${{ env.UNIQUE_TAG }}.tar
505490

506491
- name: Upload artifact
507-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
492+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
508493
with:
509-
name: containers-${{ env.PLATFORM_PAIR }}
510-
path: /tmp/${{ env.PLATFORM_UNIQUE_TAG }}.tar
494+
name: containers-${{ env.APPLICATION_NAME }}
495+
path: /tmp/${{ env.UNIQUE_TAG }}.tar
511496
if-no-files-found: error
512497
retention-days: 1
513498

514499
docker-publish:
515500
name: Publish Docker container
516501
runs-on: ubuntu-latest
517502
needs:
518-
- cargo-build
519-
- cargo-fmt
520-
- cargo-test-and-report
521-
- cargo-clippy-and-report
522503
- docker-build
523504
# Check if the event is not triggered by a fork
524505
if: |
525506
github.event.pull_request.head.repo.full_name == github.repository &&
526507
github.event_name == 'pull_request'
508+
env:
509+
APPLICATION_NAME: PLACEHOLDER # overridden in step 'Set application name', this is merely to satisfy the linter
527510
steps:
528511
- name: Set up Docker Buildx
529-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
512+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
530513

531514
- name: Download artifact
532515
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
@@ -542,26 +525,35 @@ jobs:
542525
username: ${{ github.actor }}
543526
password: ${{ secrets.GITHUB_TOKEN }}
544527

528+
- name: Set application name
529+
shell: bash
530+
run: |
531+
APPLICATION_NAME=${{ github.repository }}
532+
echo "APPLICATION_NAME=${APPLICATION_NAME##*/}" >> ${GITHUB_ENV}
533+
545534
- name: Lowercase the image name
546535
shell: bash
547536
run: |
548537
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
549538
550539
- name: Load images from artifacts
551540
shell: bash
541+
id: image
542+
working-directory: /tmp/containers
552543
run: |
553-
ls -l /tmp/containers/
544+
echo "${{ secrets.GITHUB_TOKEN }}" | oras login -u "${{ github.actor }}" --password-stdin ${{ env.REGISTRY }}
545+
546+
ls -l /tmp/containers
554547
for container in /tmp/containers/*
555548
do
556-
echo $container
557-
docker load --input $container
549+
echo "Found ${container}"
558550
tag=$(basename -- $container .tar)
559-
echo ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:${tag}
560-
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}
551+
552+
oras copy --from-oci-layout "${container}:${tag}" "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${tag}"
561553
done
562554
563555
- name: Extract Docker metadata
564-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
556+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
565557
id: meta
566558
with:
567559
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@@ -574,18 +566,13 @@ jobs:
574566
working-directory: /tmp/containers
575567
run: |
576568
# all files in dir
577-
platform_tags=(*)
578-
569+
containers=(*)
579570
# yeet extension
580-
platform_tags=${platform_tags[@]%.tar}
581-
571+
containers=${containers[@]%.tar}
582572
new_tags="${{ join(steps.meta.outputs.tags, ' ') }}"
583573
new_tags=$(printf -- '--tag %s ' $new_tags)
584-
585-
expanded_platform_tags=$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:%s ' $platform_tags)
586-
587-
docker buildx imagetools create $new_tags $expanded_platform_tags
588-
574+
expanded_containters_tags=$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:%s ' ${containers})
575+
docker buildx imagetools create $new_tags $expanded_containters_tags
589576
for new_tag in $(echo "${{ join(steps.meta.outputs.tags, ' ') }}"); do
590577
docker buildx imagetools inspect --raw $new_tag
591578
done

Diff for: .github/workflows/lint-commits.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fetch-depth: 0
2525

2626
- name: Cache dependencies
27-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
27+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
2828
env:
2929
CACHE_NAME: cargo-cache-dependencies
3030
with:

Diff for: .github/workflows/retag-containers-after-push.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
165165
- name: Set the new TAGs
166166
id: meta
167-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
167+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
168168
with:
169169
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
170170
flavor: |

Diff for: .github/workflows/retag-containers-after-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
111111
- name: Set the new TAGs
112112
id: meta
113-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
113+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
114114
with:
115115
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
116116
tags: |

Diff for: .github/workflows/semgrep.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
container:
22-
image: returntocorp/semgrep:1.95.0@sha256:30e6afa99ebd8e7b4115d4904898108eb4bf77025819e9263f09cf14e6f6e549
22+
image: returntocorp/semgrep:1.101.0@sha256:a2917a82fec40f4d165fd701abb3937677b900105f3e909861fa03844a8e00db
2323

2424
steps:
2525
- name: Checkout
@@ -36,6 +36,6 @@ jobs:
3636
- name: Upload SARIF file for GitHub Advanced Security Dashboard
3737
if: |
3838
always()
39-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
39+
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
4040
with:
4141
sarif_file: semgrep.sarif

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.11.0
1+
22.12.0

0 commit comments

Comments
 (0)