Fix get branch step

This commit is contained in:
David Sanz 2020-12-23 11:32:44 +01:00
parent 475e07b93c
commit 2d6e17f5f1

View File

@ -56,27 +56,28 @@ jobs:
- name: Get branch name - name: Get branch name
run: | run: |
currentbranch=$(echo ${GITHUB_REF#refs/heads/}) currentbranch=$(echo ${GITHUB_REF##*/})
echo $currentbranch echo "running on $currentbranch"
echo "branch=$currentbranch" >> $GITHUB_ENV echo "branch=$currentbranch" >> $GITHUB_ENV
printenv
shell: bash shell: bash
- name: Compose build ${{ env.services }} # - name: Compose build ${{ env.services }}
run: | # run: |
echo "A initial message" # echo "A initial message"
sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} # sudo docker-compose -f src/docker-compose.yml build ${{ env.services }}
docker images # docker images
shell: bash # shell: bash
env: # env:
TAG: ${{ env.branch }} # TAG: ${{ env.branch }}
REGISTRY: ${{ env.registryEndpoint }} # REGISTRY: ${{ env.registryEndpoint }}
- name: Compose push ${{ env.image }} # - name: Compose push ${{ env.image }}
run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} # run: sudo 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