Files
astrocore/.gitea/workflows/publish.yml
2025-06-16 16:45:25 -04:00

41 lines
964 B
YAML

name: Build and Publish
on:
push:
branches: [ main ]
env:
REGISTRY: gitea.example.com
IMAGE_NAME: your-username/your-app
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x' # adjust as needed
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish
run: dotnet publish --configuration Release --output ./publish
# - name: Log in to Gitea Docker Registry
# run: echo "${{ secrets.GITEA_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ secrets.GITEA_USERNAME }} --password-stdin
# - name: Build Docker image
# run: docker build -t $REGISTRY/$IMAGE_NAME:latest .
# - name: Push Docker image
# run: docker push $REGISTRY/$IMAGE_NAME:latest