Add docker-machine env eval

This commit is contained in:
David Sanz 2020-12-23 10:19:10 +01:00
parent 78bf5ee00a
commit e4129664eb

View File

@ -15,6 +15,7 @@ env:
services: basket-api services: basket-api
image: basket.api image: basket.api
branch: $(echo ${GITHUB_REF#refs/heads/}) branch: $(echo ${GITHUB_REF#refs/heads/})
jobs: jobs:
# login: # login:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
@ -54,24 +55,39 @@ jobs:
steps: steps:
- name: 'Checkout Github Action' - name: 'Checkout Github Action'
uses: actions/checkout@master uses: actions/checkout@master
- name: Login to Container Registry - name: Login to Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
registry: ${{ env.registryEndpoint }} registry: ${{ env.registryEndpoint }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
- name: Docker environment
run: eval $(docker-machine env dev)
shell: bash
- name: Compose build ${{ env.services }} - name: Compose build ${{ env.services }}
run: docker-compose -f src/docker-compose.yml build ${{ env.services }} run: docker-compose -f src/docker-compose.yml build ${{ env.services }}
shell: bash shell: bash
env: env:
TAG: ${{ env.branch }} TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }} REGISTRY: ${{ env.registryEndpoint }}
- name: Compose build ${{ env.services }}
run: docker-compose -f src/docker-compose.yml build ${{ env.services }}
shell: bash
env:
TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }}
- name: Compose push ${{ env.image }} - name: Compose push ${{ env.image }}
run: docker-compose -f src/docker-compose.yml push ${{ env.services }} run: docker-compose -f src/docker-compose.yml push ${{ env.services }}
shell: bash shell: bash
env: env:
TAG: ${{ env.branch }} TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }} REGISTRY: ${{ env.registryEndpoint }}
BuildWindows: BuildWindows:
runs-on: windows-2019 runs-on: windows-2019
if: ${{ false }} if: ${{ false }}