fix docs CI #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish docker image | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- master # Push events on master branch | |
jobs: | |
deploy-judi-image: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.6', '1.7', '1.8'] | |
steps: | |
- name: Check event name | |
run: echo ${{ github.event_name }} | |
- name: Checkout JUDI | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: JUDI development image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./docker/Dockerfile.JUDI | |
push: true | |
network: host | |
build-args: JVER=${{ matrix.version }} | |
tags: mloubout/judi:${{ matrix.version }}-dev | |
- name: JUDI release image | |
if: github.event_name == 'release' | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./docker/Dockerfile.JUDI | |
push: true | |
network: host | |
build-args: JVER=${{ matrix.version }} | |
tags: | | |
mloubout/judi:${{ matrix.version }}-latest | |
mloubout/judi:${{ matrix.version }}-${{ github.event.release.tag_name }} | |
test-judi-image: | |
needs: deploy-judi-image | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.6', '1.7', '1.8'] | |
steps: | |
- name: Run simple test | |
run: | | |
docker pull 'mloubout/judi:${{ matrix.version }}-dev' | |
docker run --rm --name testrun 'mloubout/judi:${{ matrix.version }}-dev' julia -e 'using Pkg;ENV["GROUP"]="BASICS";Pkg.test("JUDI")' | |
# NOTE: Suitable for the time being but will need to modify when we switch runners | |
- name: Clean | |
run: | | |
docker system prune -a -f |