Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

fix secret

fix secret #59

Workflow file for this run

name: CI
on:
push:
branches:
- staged
permissions:
contents: write
packages: write
jobs:
build-ci-image:
runs-on: blacksmith-16vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- name: Check for Dockerfile.ci changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
dockerfile:
- 'Dockerfile.ci'
- name: Set up Docker Buildx
if: steps.filter.outputs.dockerfile == 'true'
uses: useblacksmith/setup-docker-builder@v1
- name: Log in to GitHub Container Registry
if: steps.filter.outputs.dockerfile == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
if: steps.filter.outputs.dockerfile == 'true'
uses: useblacksmith/build-push-action@v2
with:
context: .
file: Dockerfile.ci
push: true
tags: ghcr.io/mesa-dot-dev/sdk-rust-ci:latest
lint:
needs: build-ci-image
runs-on: blacksmith-4vcpu-ubuntu-2404
container:
image: ghcr.io/mesa-dot-dev/sdk-rust-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: staged
fetch-depth: 1
- name: Cache cargo registry and build
uses: Swatinem/rust-cache@v2
- name: Run clippy on mesa-dev
run: cargo clippy -p mesa-dev --no-deps -- -D warnings
format:
needs: build-ci-image
runs-on: blacksmith-2vcpu-ubuntu-2404
container:
image: ghcr.io/mesa-dot-dev/sdk-rust-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: staged
fetch-depth: 1
- name: Check formatting of mesa-dev
run: cargo fmt -p mesa-dev --check
test:
needs: build-ci-image
runs-on: blacksmith-16vcpu-ubuntu-2404
container:
image: ghcr.io/mesa-dot-dev/sdk-rust-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: staged
fetch-depth: 1
- name: Cache cargo registry and build
uses: Swatinem/rust-cache@v2
- name: Run tests
timeout-minutes: 10
env:
MESA_TEST_API_KEY: ${{ secrets.MESA_TEST_API_KEY }}
MESA_TEST_ORG: ${{ secrets.MESA_TEST_ORG }}
run: cargo test --workspace
release:
needs: [lint, format, test]
runs-on: blacksmith-2vcpu-ubuntu-2404
container:
image: ghcr.io/mesa-dot-dev/sdk-rust-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: staged
fetch-depth: 0
- name: Bump minor version
run: |
cargo set-version --manifest-path crates/mesa-dev-oapi/Cargo.toml --bump minor
NEW_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "mesa_dev_oapi") | .version')
cargo set-version --manifest-path crates/mesa-dev/Cargo.toml "${NEW_VERSION}"
toml set crates/mesa-dev/Cargo.toml dependencies.mesa_dev_oapi.version "${NEW_VERSION}" > crates/mesa-dev/Cargo.toml.tmp && mv crates/mesa-dev/Cargo.toml.tmp crates/mesa-dev/Cargo.toml
- name: Regenerate lockfile
run: cargo update --workspace
- name: Commit and push version bump
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "mesa-ci[bot]"
git config --global user.email "ci-bot@mesa.dev"
NEW_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "mesa-dev") | .version')
git add crates/mesa-dev/Cargo.toml crates/mesa-dev-oapi/Cargo.toml Cargo.lock
git commit -m "Bump mesa-dev to ${NEW_VERSION}"
git push origin staged
- name: Fast-forward merge staged into main
run: |
git checkout main
git fetch origin main
git merge --ff-only staged
git push origin main
on-failure:
runs-on: blacksmith-2vcpu-ubuntu-2404
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
needs:
- build-ci-image
- format
- lint
- release
- test
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_USERNAME: mesa-gh
SLACK_TITLE: Workflow ${{ needs.*.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}