fix: migrate deploy to self-hosted
This commit is contained in:
parent
f69c60c146
commit
94f68bfbbb
1 changed files with 5 additions and 8 deletions
|
|
@ -8,13 +8,8 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: host
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt-get install -y nodejs
|
|
||||||
node -v
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
@ -25,7 +20,9 @@ jobs:
|
||||||
go build -o nyanimedb .
|
go build -o nyanimedb .
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t nyanimedb:latest .
|
run: |
|
||||||
|
cd modules/server
|
||||||
|
docker build -t nyanimedb:latest .
|
||||||
|
|
||||||
- name: Save Docker image artifact
|
- name: Save Docker image artifact
|
||||||
run: docker save nyanimedb:latest -o nyanimedb.tar
|
run: docker save nyanimedb:latest -o nyanimedb.tar
|
||||||
|
|
@ -37,7 +34,7 @@ jobs:
|
||||||
path: nyanimedb.tar
|
path: nyanimedb.tar
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: host
|
runs-on: self-hosted
|
||||||
needs: build
|
needs: build
|
||||||
if: ${{ github.event.inputs.deploy == 'true' }} # manual deploy trigger
|
if: ${{ github.event.inputs.deploy == 'true' }} # manual deploy trigger
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue