-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (35 loc) · 918 Bytes
/
api.yml
File metadata and controls
40 lines (35 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: API
on:
push:
branches: [ main, dev ]
paths:
- 'csharp/**'
- '.github/workflows/api.yml'
pull_request:
branches: [ main, dev ]
paths:
- 'csharp/**'
- '.github/workflows/api.yml'
release:
types: [published, created]
env:
DOCKER_IMAGE: trainprotocol/solver-api
DOTNET_VERSION: 9
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker build and push
id: docker
uses: ./.github/actions/docker
with:
file: csharp/src/API/Dockerfile
docker-image: ${{ env.DOCKER_IMAGE }}
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
build-args: |
DOTNET_VERSION=${{ env.DOTNET_VERSION }}