Skip to content

chore(deps,rust): update rust-lang.rust-analyzer, usernamehw.errorlens #1259

chore(deps,rust): update rust-lang.rust-analyzer, usernamehw.errorlens

chore(deps,rust): update rust-lang.rust-analyzer, usernamehw.errorlens #1259

Workflow file for this run

---
name: Build & Push
on:
merge_group:
pull_request:
push:
tags: ["v*.*.*"]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
env:
REGISTRY: ghcr.io
jobs:
build-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
pull-requests: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
strategy:
matrix:
flavor: ["cpp", "rust"]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
if: github.event_name != 'merge_group'
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
if: github.event_name != 'merge_group'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
id: metadata
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.flavor }}
# Generate Docker tags based on the following events/attributes
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{raw}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Generate image LABEL for devcontainer.metadata
# the sed expression is a workaround for quotes being eaten in arrays (e.g. ["x", "y", "z"] -> ["x",y,"z"])
- run: echo "metadata=$(jq -cj '.' .devcontainer/${{ matrix.flavor }}/devcontainer-metadata-vscode.json | sed 's/,"/, "/g')" >> "$GITHUB_OUTPUT"
id: devcontainer-metadata
- uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
id: build-and-push
with:
file: .devcontainer/${{ matrix.flavor }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'merge_group' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: |
${{ steps.metadata.outputs.labels }}
devcontainer.metadata=${{ steps.devcontainer-metadata.outputs.metadata }}
annotations: ${{ steps.metadata.outputs.annotations }}
sbom: true
provenance: true
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: ./.github/actions/container-size-diff
id: container-size-diff
with:
from-container: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.flavor }}:latest
to-container: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.flavor }}@${{ steps.build-and-push.outputs.digest }}
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
with:
header: container-size-diff-${{ matrix.flavor }}
message: |
${{ steps.container-size-diff.outputs.size-diff-markdown }}
- uses: anchore/sbom-action@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0
if: steps.build-and-push.outputs.digest != '' && github.event_name != 'merge_group'
with:
image: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.flavor }}@${{ steps.build-and-push.outputs.digest }}
dependency-snapshot: true
- uses: actions/dependency-review-action@0c155c5e8556a497adf53f2c18edabf945ed8e70 # v4.3.2
if: github.event_name == 'pull_request'
with:
comment-summary-in-pr: on-failure
fail-on-severity: critical
- name: Sign the images with GitHub OIDC token
if: github.event_name != 'merge_group'
# This step uses the GitHub OIDC identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: |
cosign sign --yes --recursive "${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.flavor }}@${DIGEST}"