feat: build and push to local registry
Some checks failed
Build and Deploy Go App / build (push) Failing after 6m45s
Build and Deploy Go App / deploy (push) Has been skipped

This commit is contained in:
nihonium 2025-10-08 17:50:28 +03:00
parent 49ba6b4687
commit 6bf6aa31e8
Signed by: nihonium
GPG key ID: 0251623741027CFC

View file

@ -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