friends-api/.forgejo/workflows/build.yml
red binder c21ac31f7c
Some checks failed
Build friends-api / build-and-push (push) Failing after 4s
.
2026-08-09 02:23:13 +02:00

26 lines
No EOL
835 B
YAML

name: Build friends-api
on:
push:
jobs:
build-and-push:
runs-on: debian-trixie
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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=git.spbr.net/spacebar/${{ forgejo.repository }}"
docker build -t "${IMAGE_BASE}:latest" -t "${IMAGE_BASE}:${{ forgejo.sha }}" .
docker push "${IMAGE_BASE}:latest"
docker push "${IMAGE_BASE}:${{ forgejo.sha }}"