friends-api/.forgejo/workflows/build.yml
red binder a9fc4989b8
Some checks failed
Build friends-api / build-and-push (push) Failing after 1s
picky son of a gun
2026-08-09 02:21:22 +02:00

23 lines
No EOL
771 B
YAML

name: Build friends-api
on:
push:
jobs:
build-and-push:
runs-on: debian-trixie
steps:
- name: Build friends-api binary
run: |
/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: |
echo "${{ secrets.PACKAGE_PWD }}" | docker login "${{ forgejo.server_url }}" -u "${{ secrets.PACKAGE_USER }}" --password-stdin
IMAGE_BASE="${{ forgejo.server_url }}/${{ forgejo.repository }}"
docker build -t "${IMAGE_BASE}:latest" -t "${IMAGE_BASE}:${{ forgejo.sha }}" .
docker push "${IMAGE_BASE}:latest"
docker push "${IMAGE_BASE}:${{ forgejo.sha }}"