Skip to content

fix(anubis cd): specify version for cargo nextest #2

fix(anubis cd): specify version for cargo nextest

fix(anubis cd): specify version for cargo nextest #2

Workflow file for this run

name: Anubis - Build Docker image and publish to GitHub Packages
on:
push:
tags:
- "v*.*.*"
# branches:
# - develop
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-cd.yaml"
# pull_request:
# branches:
# - develop
#
# paths:
# - "anubis-eval/**"
# - ".github/workflows/anubis-eval-cd.yaml"
env:
REGISTRY: ghcr.io
IMAGE_NAME: anubis-eval
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: anubis-eval
steps:
- uses: actions/checkout@v4
- name: Setup rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: '1.72.0'
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: '0.9.64'
locked: true
- name: Build
run: cargo build --release
- name: Test
run: cargo nextest run --all-features --profile ci
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: anubis-eval
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}