ci) add gitea actions and refresh readme
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 4m18s

This commit is contained in:
2026-02-20 19:58:56 -05:00
parent a348fb034d
commit 278ed6a41e
3 changed files with 156 additions and 19 deletions

View File

@@ -0,0 +1,43 @@
name: Build and Push Image
on:
push:
branches:
- main
env:
REGISTRY_HOST: git.campbellwireless.net
IMAGE_NAME: ${{ github.repository }}
jobs:
docker-build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_HOST }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Compute image tags
id: tags
run: |
echo "sha_short=$(echo '${{ github.sha }}' | cut -c1-12)" >> "$GITHUB_OUTPUT"
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.sha_short }}

View File

@@ -0,0 +1,32 @@
name: PR Checks
on:
pull_request:
jobs:
lint-test-and-docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.2.22'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Unit tests
run: bun run test
- name: Build app
run: bun run build
- name: Build Docker image
run: docker build --file Dockerfile --tag trips:pr-${{ github.sha }} .