move around c/i and add publish script

This commit is contained in:
Luc Rose 2025-05-22 14:11:52 -04:00
parent fadc13b6e6
commit ce4679b9f8
8 changed files with 73 additions and 238 deletions

View file

@ -0,0 +1,31 @@
name: Build Docker Image
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
docker:
runs-on: docker
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: "docker"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: ./Dockerfile
platforms: linux/amd64
tags: pupsiehub/vrcauthproxy:latest
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -0,0 +1,37 @@
name: Build Docker Image
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
docker:
runs-on: docker
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: pupsiehub/vrcauthproxy
tags: |
type=ref,event=tag
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: ./Dockerfile
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -0,0 +1,35 @@
name: Run Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test with coverage
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./lcov.info
# fail_ci_if_error: false