Some checks failed
Push Workflows / rustfmt (push) Successful in 7s
Push Workflows / tailwind-build (push) Successful in 7s
Push Workflows / docker-build (push) Failing after 26s
Push Workflows / docs (push) Successful in 55s
Push Workflows / clippy (push) Successful in 52s
Push Workflows / test (push) Successful in 1m1s
Push Workflows / build (push) Successful in 1m51s
Push Workflows / nix-build (push) Successful in 5m15s
122 lines
3.5 KiB
YAML
122 lines
3.5 KiB
YAML
name: Push Workflows
|
|
on: push
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: libretunes-cicd-dx
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Use Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
- name: Run tailwindcss
|
|
run: tailwindcss --input style/tailwind.css --output assets/tailwind.css
|
|
- name: Build project
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
run: dx build
|
|
|
|
test:
|
|
runs-on: libretunes-cicd-dx
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Use Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
- name: Run tailwindcss
|
|
run: tailwindcss --input style/tailwind.css --output assets/tailwind.css
|
|
- name: Test project
|
|
run: cargo test --all-targets --all-features
|
|
|
|
docs:
|
|
runs-on: libretunes-cicd-dx
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Use Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
- name: Run tailwindcss
|
|
run: tailwindcss --input style/tailwind.css --output assets/tailwind.css
|
|
- name: Generate docs
|
|
run: cargo doc --no-deps
|
|
- name: Upload docs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: docs
|
|
path: target/doc
|
|
|
|
nix-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Update Package Lists
|
|
run: apt update
|
|
- name: Install Nix
|
|
run: apt install -y nix-bin
|
|
- name: Build project with Nix
|
|
run: nix build --experimental-features 'nix-command flakes' git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git?ref=$GITHUB_REF_NAME#default
|
|
|
|
clippy:
|
|
runs-on: libretunes-cicd-dx
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Use Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
- name: Run tailwindcss
|
|
run: tailwindcss --input style/tailwind.css --output assets/tailwind.css
|
|
- name: Run clippy
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
run: cargo clippy --all-targets --all-features
|
|
|
|
rustfmt:
|
|
runs-on: libretunes-cicd-dx
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Run rustfmt
|
|
run: cargo fmt --check
|
|
|
|
tailwind-build:
|
|
runs-on: libretunes-cicd-dx
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Run tailwindcss
|
|
run: tailwindcss --input style/tailwind.css
|
|
|
|
docker-build:
|
|
runs-on: ubuntu-latest-docker
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to Gitea container registry
|
|
uses: docker/login-action@v4
|
|
with:
|
|
registry: ${{ env.registry }}
|
|
- name: Get Image Name
|
|
id: get-image-name
|
|
run: |
|
|
echo "IMAGE_NAME=$(echo ${{ env.registry }}/${{ gitea.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v6
|
|
with:
|
|
images: ${{ steps.get-image-name.outputs.IMAGE_NAME }}
|
|
tags: |
|
|
type=sha
|
|
type=ref,event=branch
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|