make checks work

This commit is contained in:
Jai A
2024-10-16 15:57:44 -07:00
parent a7d4001b00
commit 907ef38189
32 changed files with 3330 additions and 6862 deletions

View File

@@ -66,5 +66,8 @@ jobs:
- name: Lint
run: pnpm lint
- name: Start Docker Compose
run: docker compose up -d
- name: Test
run: pnpm test

44
.github/workflows/labrinth-docker.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: docker-build
on:
push:
branches:
- '**'
tags:
- 'v*'
paths:
- .github/workflows/labrinth-docker.yml
- 'apps/labrinth/**'
pull_request:
paths:
- .github/workflows/labrinth-docker.yml
- 'apps/labrinth/**'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch docker metadata
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/modrinth/labrinth
-
name: Login to GitHub Images
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: .apps/labrinth/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

20
.github/workflows/security.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}