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