feat: build and push to local registry
This commit is contained in:
parent
49ba6b4687
commit
6bf6aa31e8
1 changed files with 23 additions and 5 deletions
|
|
@ -17,21 +17,39 @@ jobs:
|
|||
with:
|
||||
go-version: '^1.25'
|
||||
|
||||
# Build application
|
||||
- name: Build Go app
|
||||
run: |
|
||||
cd modules/server
|
||||
go mod tidy
|
||||
go build -o nyanimedb .
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload built application to artifactory
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nyanimedb
|
||||
path: modules/server/nyanimedb
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
cd modules/server
|
||||
docker build -t nyanimedb:latest .
|
||||
# Build Docker image
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
tags: meowgit.nekoea.red/nihonium/nyanimedb:latest
|
||||
# - name: Build Docker image
|
||||
# run: |
|
||||
# cd modules/server
|
||||
# docker build -t nyanimedb:latest .
|
||||
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue