Browse Source

Get git branch name

pull/1565/head
David Sanz 4 years ago
parent
commit
475e07b93c
1 changed files with 12 additions and 11 deletions
  1. +12
    -11
      .github/workflows/basket-api.yml

+ 12
- 11
.github/workflows/basket-api.yml View File

@ -14,18 +14,9 @@ env:
registryEndpoint:
services: basket-api
image: basket.api
branch: $(echo ${GITHUB_REF#refs/heads/})
# 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' }}
@ -63,8 +54,18 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Get branch name
run: |
currentbranch=$(echo ${GITHUB_REF#refs/heads/})
echo $currentbranch
echo "branch=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.services }}
run: sudo docker-compose -f src/docker-compose.yml build ${{ env.services }}
run: |
echo "A initial message"
sudo docker-compose -f src/docker-compose.yml build ${{ env.services }}
docker images
shell: bash
env:
TAG: ${{ env.branch }}


Loading…
Cancel
Save