forked from dotnet-architecture/eShopOnContainers
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.48 KB
/
ordering-api.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: ordering-api
on:
workflow_dispatch:
push:
branches:
- dev
paths:
- src/BuildingBlocks/**
- src/Services/Ordering/**
- .github/workflows/ordering-api.yml
pull_request:
branches:
- dev
paths:
- src/BuildingBlocks/**
- src/Services/Ordering/**
- .github/workflows/ordering-api.yml
env:
SERVICE: ordering-api
IMAGE: ordering.api
DOTNET_VERSION: 7.0.x
PROJECT_PATH: Services/Ordering/Ordering.API
TESTS_PATH: Services/Ordering/Ordering.UnitTests
jobs:
BuildContainersForPR_Linux:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-test
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
dotnet_version: ${{ env.DOTNET_VERSION }}
project_path: ${{ env.PROJECT_PATH }}
tests_path: ${{ env.TESTS_PATH }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}