friends-api/.forgejo/workflows/build.yml

26 lines
827 B
YAML
Raw Normal View History

name: Build friends-api
on:
push:
jobs:
build-and-push:
2026-08-09 02:21:22 +02:00
runs-on: debian-trixie
steps:
- name: Checkout repository
2026-08-09 00:30:41 +00:00
uses: actions/checkout@v7
2026-08-09 02:23:13 +02:00
- name: Build friends-api binary
run: |
2026-08-09 02:21:22 +02:00
/root/.bun/bin/bun install --frozen-lockfile --production
/root/.bun/bin/bun build ./index.js --compile --minify --outfile friends-api
- name: Build and push docker image
run: |
2026-08-09 02:18:24 +02:00
echo "${{ secrets.PACKAGE_PWD }}" | docker login "${{ forgejo.server_url }}" -u "${{ secrets.PACKAGE_USER }}" --password-stdin
IMAGE_BASE="git.spbr.net/${{ forgejo.repository }}"
2026-08-09 02:18:24 +02:00
docker build -t "${IMAGE_BASE}:latest" -t "${IMAGE_BASE}:${{ forgejo.sha }}" .
docker push "${IMAGE_BASE}:latest"
2026-08-09 02:18:24 +02:00
docker push "${IMAGE_BASE}:${{ forgejo.sha }}"