Skip to content

chore(deps): bump the cargo group with 2 updates (#74) #67

chore(deps): bump the cargo group with 2 updates (#74)

chore(deps): bump the cargo group with 2 updates (#74) #67

Workflow file for this run

---
name: ci
"on":
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- LICENSE
- README.md
- fly.toml
- '.gitignore'
- '.github/workflows/*'
- '.github/dependabot.yaml'
pull_request:
branches:
- master
paths-ignore:
- LICENSE
- README.md
- fly.toml
- '.gitignore'
- '.github/workflows/*'
- '.github/dependabot.yaml'
permissions:
contents: read
id-token: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: build filmbot
runs-on: ubuntu-latest
steps:
- name: checkout project
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: rust stable latest
id: rust
run: |
latest="$(curl -sL https://api.github.com/repos/rust-lang/rust/releases/latest | jq -r .tag_name)"
echo "rust stable latest: ${latest}"
echo "stable_latest=${latest}" >> "$GITHUB_OUTPUT"
used="$(cargo --version | awk '{print $2}')"
echo "rust stable used: ${used}"
echo "stable_used=${used}" >> "$GITHUB_OUTPUT"
- name: check cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: cache
with:
path: |
~/.cargo/
~/.rustup/
target/
key: ${{ runner.os }}-rust-${{ steps.rust.outputs.stable_latest }}-${{ hashFiles('Cargo.toml') }}-${{ hashFiles('Cargo.lock') }}
- name: update toolchain
if: steps.rust.outputs.stable_latest != steps.rust.outputs.stable_used
run: |
rustup update stable
- name: cargo fmt
run: |
cargo fmt -- --check --verbose
- name: cargo clippy
run: |
cargo clippy --locked --workspace
- name: build filmbot
run: |
cargo build --release --locked
- name: install cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20
- name: verify base images
run: |
cosign dockerfile verify \
--certificate-identity \
'https://github.com/chainguard-images/images/.github/workflows/release.yaml@refs/heads/main' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
Dockerfile | jq .
- name: docker buildx
id: buildx
uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27
- name: login ghcr.io
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: docker metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: ${{ env.IMAGE_NAME }}
- name: build filmbot (devel)
id: docker
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
with:
context: .
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:devel
labels: ${{ steps.meta.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
sbom: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
provenance: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
load: ${{ github.event_name == 'pull_request' }}
- name: smoke test
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
set -x
# only ensure runtime deps are ok
docker run --rm \
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.docker.outputs.digest }}" &> filmbot.log || true
cat filmbot.log
grep --quiet --fixed-strings "TELOXIDE_TOKEN" filmbot.log
- name: smoke test
if: github.event_name == 'pull_request'
run: |
set -x
# only ensure runtime deps are ok
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:devel &> filmbot.log || true
cat filmbot.log
grep --quiet --fixed-strings "TELOXIDE_TOKEN" filmbot.log
- name: cosign filmbot
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
cosign sign -y "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.docker.outputs.digest }}"
- name: install crane
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: imjasonh/setup-crane@31b88efe9de28ae0ffa220711af4b60be9435f6e
- name: tag filmbot (latest)
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
crane tag "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:devel" latest