Skip to content

build(deps): bump docker/metadata-action from 5.9.0 to 5.10.0 #158

build(deps): bump docker/metadata-action from 5.9.0 to 5.10.0

build(deps): bump docker/metadata-action from 5.9.0 to 5.10.0 #158

Workflow file for this run

name: "Build"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.rust-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
rust-version: [ stable, beta, nightly ]
steps:
- name: "Checkout"
uses: actions/checkout@v5
- name: "Setup - Rust Toolchain"
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
if: steps.changes.outputs.src == 'true'
with:
components: clippy,rustfmt
toolchain: ${{ matrix.rust-version }}
- name: "Restore cached Cargo"
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.rust-version }}-cargo
- name: "Formatting Check"
run: cargo fmt --check
- name: "Run build..."
run: |
set -e
cargo build --workspace
cargo test --workspace
- name: Save Cargo / Rust Cache
id: cache-save
if: ${{ github.event_name == 'push' }}
uses: actions/cache/save@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
container:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
id-token: write
contents: write
env:
REGISTRY: ghcr.io
steps:
- name: "Checkout"
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Set Container Metadata
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
id: meta
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
# latest / main
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Container ${{ github.repository }}
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
id: build
with:
file: "./Dockerfile"
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# SBOM Settings
sbom: true
# Pass GitHub token as a build secret
secrets: |
"github_token=${{ secrets.GITHUB_TOKEN }}"
# Upload Software Bill of Materials (SBOM) to GitHub
- name: Upload SBOM
uses: advanced-security/spdx-dependency-submission-action@5530bab9ee4bbe66420ce8280624036c77f89746 # v0.1.1
with:
filePath: '.'
filePattern: '*.spdx.json'
markdown:
uses: advanced-security/reusable-workflows/.github/workflows/markdown-lint.yml@main
if: github.event_name == 'pull_request'
permissions:
id-token: write
contents: write
pull-requests: read
secrets: inherit