Skip to content

Commit 467ce2e

Browse files
committed
Updated github action
1 parent bfccc46 commit 467ce2e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
on: [push]
22

3-
env:
4-
REGISTRY_DOMAIN: ${{ secrets.REGISTRY_DOMAIN }}
5-
63
jobs:
74
build:
85
name: Build/test and push
96
runs-on: ubuntu-latest
107
env:
8+
REGISTRY_DOMAIN: ${{ secrets.REGISTRY_DOMAIN }}
119
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
1210
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
1311
steps:
@@ -38,7 +36,7 @@ jobs:
3836
run: |
3937
docker-compose -f docker-compose.actions.yml pull
4038
docker-compose -f docker-compose.actions.yml up -d
41-
while [[ "$(wget --server-response http://localhost/api/ping -O ip-tmp 2>&1| grep -c 'HTTP/1.1 200 OK')" -ne 200 ]]; do sleep 3; echo "Waiting API to be available..."; done
39+
while [[ "$(wget --server-response http://localhost/api/ping -O ip-tmp 2>&1| grep -c 'HTTP/1.1 200 OK')" -ne 1 ]]; do sleep 3; echo "Waiting API to be available..."; done
4240
- name: Lint API
4341
run: |
4442
docker exec api composer run sniff
@@ -52,10 +50,10 @@ jobs:
5250
- name: Unit test backend
5351
run: |
5452
docker exec backend npm run test
55-
- name: Lint frontend
53+
- name: Lint frontend
5654
run: |
5755
docker exec frontend npm run lint
58-
- name: Unit test frontend
56+
- name: Unit test frontend
5957
run: |
6058
docker exec frontend npm run test
6159
- name: Build api latest image
@@ -75,4 +73,4 @@ jobs:
7573
run: |
7674
cd frontend
7775
docker build . --target production-stage -t $REGISTRY_DOMAIN/chrisleekr/yii2-angular-boilerplate:frontend-latest
78-
docker push $REGISTRY_DOMAIN/chrisleekr/yii2-angular-boilerplate:frontend-latest
76+
docker push $REGISTRY_DOMAIN/chrisleekr/yii2-angular-boilerplate:frontend-latest

0 commit comments

Comments
 (0)