cicd: pipeline for dev-ars branch
This commit is contained in:
parent
522e7554fe
commit
1b40ebdbd9
2 changed files with 50 additions and 1 deletions
49
.forgejo/workflows/dev-ars.yml
Normal file
49
.forgejo/workflows/dev-ars.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
name: Build (backend build only)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev-ars
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Build backend
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '^1.25'
|
||||
|
||||
- name: Build backend
|
||||
run: |
|
||||
cd modules/backend
|
||||
go build -o nyanimedb .
|
||||
tar -czvf nyanimedb-backend.tar.gz nyanimedb
|
||||
|
||||
- name: Upload built backend to artifactory
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nyanimedb-backend.tar.gz
|
||||
path: modules/backend/nyanimedb-backend.tar.gz
|
||||
|
||||
# Build Docker images
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push backend image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfiles/Dockerfile_backend
|
||||
push: true
|
||||
tags: meowgit.nekoea.red/nihonium/nyanimedb-backend:latest
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
name: Build and Deploy (frontend build only)
|
||||
name: Build (frontend build only)
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue