52 lines
1.2 KiB
YAML
Raw Normal View History

2020-12-22 13:53:57 +01:00
name: basket-api
2020-12-22 13:45:30 +01:00
on:
2021-04-15 10:25:56 -05:00
workflow_dispatch:
2020-12-22 13:45:30 +01:00
push:
branches:
- dev
2020-12-24 15:32:03 +01:00
2020-12-22 13:45:30 +01:00
paths:
2021-01-26 12:26:05 +01:00
- src/BuildingBlocks/**
- src/Services/Basket/**
2020-12-22 13:53:57 +01:00
- .github/workflows/basket-api.yml
2020-12-24 10:08:56 +01:00
pull_request:
branches:
- dev
2021-01-24 22:01:48 +01:00
paths:
2021-01-26 12:26:05 +01:00
- src/BuildingBlocks/**
- src/Services/Basket/**
2021-01-24 22:01:48 +01:00
- .github/workflows/basket-api.yml
2020-12-22 13:45:30 +01:00
env:
2020-12-24 12:50:42 +01:00
SERVICE: basket-api
IMAGE: basket.api
2020-12-23 10:19:10 +01:00
2020-12-22 13:45:30 +01:00
jobs:
2020-12-24 10:44:05 +01:00
2020-12-22 13:45:30 +01:00
BuildContainersForPR_Linux:
2020-12-24 10:44:05 +01:00
runs-on: ubuntu-latest
2020-12-24 11:03:52 +01:00
if: ${{ github.event_name == 'pull_request' }}
2020-12-22 13:45:30 +01:00
steps:
2021-08-27 13:12:26 -05:00
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
2021-04-15 10:50:19 -05:00
with:
2021-08-27 13:12:26 -05:00
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
2020-12-24 10:44:05 +01:00
2020-12-22 13:45:30 +01:00
BuildLinux:
2020-12-22 17:12:21 +01:00
runs-on: ubuntu-latest
2020-12-22 13:45:30 +01:00
if: ${{ github.event_name != 'pull_request' }}
steps:
2021-08-27 13:12:26 -05:00
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
2021-04-15 10:24:28 -05:00
with:
2021-08-27 13:12:26 -05:00
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 }}