Skip to content

Commit

Permalink
ci(gh-actions): Enable docker push for scheduled workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
PetarKirov committed Nov 29, 2021
1 parent 4dd3d73 commit dce2dc3
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/run-test-sh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@ jobs:
main:
name: Test image
strategy:
fail-fast: false # Finish other jobs on failure
fail-fast: true
matrix:
include:
- { version: dmd-nightly, exec: dmd }
- { version: dmd-beta, exec: dmd }
- { version: dmd, exec: dmd }
- { version: ldc-beta, exec: ldmd2 }
- { version: ldc, exec: ldmd2 }

runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -36,19 +39,22 @@ jobs:
- name: Build image
uses: docker/build-push-action@v2
with:
push: ${{ github.event_name == 'push' }}
load: ${{ github.event_name != 'push' }}
push: false
load: true
tags: dlangtour/core-exec:${{ matrix.version }}
build-args: |
DLANG_VERSION=${{ matrix.version }}
DLANG_EXEC=${{ matrix.exec }}
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: true

- name: Run test.sh
run: ./test.sh "dlangtour/core-exec:${{ matrix.version }}"

runs-on: ubuntu-latest
- name: Build image
uses: docker/build-push-action@v2
with:
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
load: false
tags: dlangtour/core-exec:${{ matrix.version }}
build-args: |
DLANG_VERSION=${{ matrix.version }}
DLANG_EXEC=${{ matrix.exec }}

0 comments on commit dce2dc3

Please sign in to comment.