Skip to content

Commit

Permalink
Merge pull request #16 from vuongxuongminh/3.x
Browse files Browse the repository at this point in the history
Update CI jobs for run parallel.
  • Loading branch information
vuongxuongminh authored Apr 30, 2021
2 parents 6b71fa5 + 0cea129 commit c820004
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,29 @@ jobs:
run: sleep 5
- name: Test with curl
run: curl http://localhost | grep "Welcome to Symfony!"
build:

build-dev:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Log into registry
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin

- name: Build images
run: |
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml build fpm
docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml build fpm
- name: Build image
run: docker-compose -f docker-compose.yaml -f docker-compose.override.yaml build fpm
- name: Push image
run: |
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml push fpm
docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml push fpm
run: docker-compose -f docker-compose.yaml -f docker-compose.override.yaml push fpm

build-prod:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log into registry
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin
- name: Build image
run: docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml build fpm
- name: Push image
run: docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml push fpm

0 comments on commit c820004

Please sign in to comment.