switch to bun and add CI, license and readme
Some checks failed
Build friends-api / build-and-push (push) Failing after 1s
Some checks failed
Build friends-api / build-and-push (push) Failing after 1s
This commit is contained in:
parent
697a03b388
commit
62b64ca706
7 changed files with 913 additions and 1020 deletions
23
.forgejo/workflows/build.yml
Normal file
23
.forgejo/workflows/build.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: Build friends-api
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Build friends-api binary
|
||||
run: |
|
||||
bun install --frozen-lockfile --production
|
||||
bun build ./index.js --compile --minify --outfile friends-api
|
||||
|
||||
- name: Build and push docker image
|
||||
run: |
|
||||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login "${{ gitea.server_url }}" -u "${{ gitea.actor }}" --password-stdin
|
||||
|
||||
IMAGE_BASE="${{ gitea.server_url }}/${{ gitea.repository }}"
|
||||
|
||||
docker build -t "${IMAGE_BASE}:latest" -t "${IMAGE_BASE}:${{ gitea.sha }}" .
|
||||
docker push "${IMAGE_BASE}:latest"
|
||||
docker push "${IMAGE_BASE}:${{ gitea.sha }}"
|
||||
Loading…
Reference in a new issue