Portfolio/.forgejo/workflows/ci.yml
Matthew L McPeak 9932bc74aa
All checks were successful
ci / build (push) Successful in 32s
ci / publish (push) Successful in 13s
fix: ci (#2)
Reviewed-on: #2
Co-authored-by: Matthew L McPeak <m.mcpeak98@icloud.com>
Co-committed-by: Matthew L McPeak <m.mcpeak98@icloud.com>
2026-06-11 17:06:26 -04:00

74 lines
2 KiB
YAML

name: ci
on:
push:
tags:
- "v*"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container: oven/bun:1
steps:
- name: Install git and node
run: apt-get update && apt-get install -y git nodejs
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Audit dependencies
run: bun audit
- name: Run unit tests
run: bun run test:unit run
- name: Type check
run: bun run type-check -- --force
- name: Build
run: bun run build-only
- name: Upload dist
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: dist
path: dist
publish:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download dist
uses: https://code.forgejo.org/forgejo/download-artifact@v4
with:
name: dist
path: dist
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: git.mcpeakdev.com
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract image tag
id: meta
run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
git.mcpeakdev.com/mcpeakml/portfolio:${{ steps.meta.outputs.tag }}
git.mcpeakdev.com/mcpeakml/portfolio:latest