add gitea docker workflows
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
parent
95986d170d
commit
bd34b874ca
28
.gitea/workflows/build-api.yml
Normal file
28
.gitea/workflows/build-api.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Build the docker image for the API
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["custom"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.ngn.tf
|
||||||
|
IMAGE: ${{gitea.repository}}/api
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: "https://github.com/actions/checkout@v4"
|
||||||
|
|
||||||
|
- name: Login to container repo
|
||||||
|
uses: "https://github.com/docker/login-action@v1"
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{gitea.actor}}
|
||||||
|
password: ${{secrets.PACKAGES_TOKEN}}
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
run: |
|
||||||
|
docker build --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest .
|
||||||
|
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
33
.gitea/workflows/build-app.yml
Normal file
33
.gitea/workflows/build-app.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Build the docker image for the frontend application
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["custom"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.ngn.tf
|
||||||
|
IMAGE: ${{gitea.repository}}/app
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: "https://github.com/actions/checkout@v4"
|
||||||
|
|
||||||
|
- name: Login to container repo
|
||||||
|
uses: "https://github.com/docker/login-action@v1"
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{gitea.actor}}
|
||||||
|
password: ${{secrets.PACKAGES_TOKEN}}
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
run: |
|
||||||
|
docker build --build-arg WEBSITE_REPORT_URL=https://git.ngn.tf/ngn/website/issues/new \
|
||||||
|
--build-arg WEBSITE_SOURCE_URL=https://git.ngn.tf/ngn/website \
|
||||||
|
--build-arg WEBSITE_APP_URL=https://ngn.tf \
|
||||||
|
--build-arg WEBSITE_API_URL=https://api.ngn.tf \
|
||||||
|
--build-arg WEBSITE_DOC_URL=http://doc:7003 \
|
||||||
|
--tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest .
|
||||||
|
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
28
.gitea/workflows/build-doc.yml
Normal file
28
.gitea/workflows/build-doc.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Build the docker image for the doc server
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["custom"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.ngn.tf
|
||||||
|
IMAGE: ${{gitea.repository}}/doc
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: "https://github.com/actions/checkout@v4"
|
||||||
|
|
||||||
|
- name: Login to container repo
|
||||||
|
uses: "https://github.com/docker/login-action@v1"
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{gitea.actor}}
|
||||||
|
password: ${{secrets.PACKAGES_TOKEN}}
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
run: |
|
||||||
|
docker build --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest .
|
||||||
|
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,3 +5,7 @@ data.db
|
|||||||
|
|
||||||
# don't ignore example deployment stuff
|
# don't ignore example deployment stuff
|
||||||
!deploy/*
|
!deploy/*
|
||||||
|
!.github/*
|
||||||
|
!.gitea/*
|
||||||
|
!.github/*/*
|
||||||
|
!.gitea/*/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user