23 lines
No EOL
771 B
YAML
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 }}" |