Skip to content

Commit 475e07b

Browse files
committed
Get git branch name
1 parent 39df598 commit 475e07b

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/basket-api.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,9 @@ env:
1414
registryEndpoint:
1515
services: basket-api
1616
image: basket.api
17-
branch: $(echo ${GITHUB_REF#refs/heads/})
17+
# branch: $(echo ${GITHUB_REF#refs/heads/})
1818

1919
jobs:
20-
# login:
21-
# runs-on: ubuntu-latest
22-
# steps:
23-
# - name: Login to Container Registry
24-
# uses: docker/login-action@v1
25-
# with:
26-
# registry: ${{ env.registryEndpoint }}
27-
# username: ${{ secrets.USERNAME }}
28-
# password: ${{ secrets.PASSWORD }}
2920
BuildContainersForPR_Linux:
3021
runs-on: ubuntu-16.04
3122
if: ${{ github.event_name == 'pull_request' }}
@@ -63,8 +54,18 @@ jobs:
6354
username: ${{ secrets.USERNAME }}
6455
password: ${{ secrets.PASSWORD }}
6556

57+
- name: Get branch name
58+
run: |
59+
currentbranch=$(echo ${GITHUB_REF#refs/heads/})
60+
echo $currentbranch
61+
echo "branch=$currentbranch" >> $GITHUB_ENV
62+
shell: bash
63+
6664
- name: Compose build ${{ env.services }}
67-
run: sudo docker-compose -f src/docker-compose.yml build ${{ env.services }}
65+
run: |
66+
echo "A initial message"
67+
sudo docker-compose -f src/docker-compose.yml build ${{ env.services }}
68+
docker images
6869
shell: bash
6970
env:
7071
TAG: ${{ env.branch }}

0 commit comments

Comments
 (0)