Skip to content

Commit

Permalink
Add GH action to periodically build docker images (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed Sep 29, 2020
1 parent beccc8c commit a4a218a
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build-docker-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: docker-images-build

on:
push:
branches: "master"
schedule:
- cron: "0 0 * * *" # Daily “At 00:00”
workflow_dispatch: # allows you to trigger manually

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jobqueue: ["pbs", "sge", "slurm"]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check versions
run: |
docker version
docker-compose version
- name: Building Image
shell: bash -l {0}
run: |
cd ./ci/${{ matrix.jobqueue }}
docker-compose build
- name: List images
run: |
docker ps -a
docker images
- name: Publish main images to DockerHub Registry
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push daskdev/dask-jobqueue:${{ matrix.jobqueue }}
- name: Publish secondary images to DockerHub Registry
if: matrix.jobqueue == 'sge' && github.ref == 'refs/heads/master' && github.event_name == 'push'
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push daskdev/dask-jobqueue:${{ matrix.jobqueue }}-slave

0 comments on commit a4a218a

Please sign in to comment.