Skip to content

Commit

Permalink
Merge pull request #676 from openedx/cag/ci
Browse files Browse the repository at this point in the history
build: skip login to docker hub and push step on error
  • Loading branch information
Cristhian Garcia authored Mar 22, 2024
2 parents be9401b + 2726e4a commit 7dc0e51
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
run:
echo ${{github.head_ref}}
- name: Log in to Docker Hub
continue-on-error: true
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
username: ${{ secrets.EDUNEXT_DOCKER_USERNAME }}
Expand All @@ -46,13 +47,16 @@ jobs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Aspects Docker Images
run: |
tutor images build ${{ matrix.service.name }} --cache-to-registry -d '--tag=${{ matrix.service.repository }}:latest'
- name: Push docker image
continue-on-error: true
if: github.event.action == 'opened' || github.event.action == 'synchronize'
run: |
tutor images build ${{ matrix.service.name }}
tutor images push ${{ matrix.service.name }}
- name: Build Aspects Docker Images Latest
- name: Push latest docker image
continue-on-error: true
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'bot/v')
run: |
tutor images build ${{ matrix.service.name }} --cache-to-registry -d '--tag=${{ matrix.service.repository }}:latest'
tutor images push ${{ matrix.service.name }}
docker image push ${{ matrix.service.repository }}:latest

0 comments on commit 7dc0e51

Please sign in to comment.