You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

83 lines
2.5 KiB

name: basket-api
on:
push:
branches:
- master
- dev
- feature/github-actions
paths:
- src/BuildingBlocks/*
- src/Services/Basket/*
- .github/workflows/basket-api.yml
env:
registryEndpoint:
services: basket-api
image: basket.api
branch: $(echo ${GITHUB_REF#refs/heads/})
jobs:
login:
runs-on: ubuntu-latest
steps:
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.registryEndpoint }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
BuildContainersForPR_Linux:
runs-on: ubuntu-16.04
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Compose build ${{ env.services }}
run: docker-compose build -f src/docker-compose.yml ${{ env.services }}
shell: bash
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}
BuildContainersForPR_Windows:
runs-on: windows-2019
if: ${{ false }}
# if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Compose build ${{ env.services }}
run: docker-compose build -f src/docker-compose.yml ${{ env.services }}
shell: pwsh
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}
PLATFORM: win
NODE_IMAGE: stefanscherer/node-windows:10
BuildLinux:
runs-on: ubuntu-16.04
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Compose build ${{ env.services }}
run: docker-compose build -f src/docker-compose.yml $env.services
shell: bash
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}
- name: Compose push ${{ env.image }}
run: docker-compose push -f src/docker-compose.yml ${{ env.services }}'
shell: bash
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}
BuildWindows:
runs-on: windows-2019
if: ${{ false }}
# if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Compose build ${{ env.services }}
run: docker-compose build -f src/docker-compose.yml ${{ env.services }}
shell: pwsh
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}
- name: Compose push ${{ env.image }}
run: docker-compose push -f src/docker-compose.yml ${{ env.services }}'
shell: pwsh
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}