lightning/.github/workflows/docker-builds.yml

43 lines
1.6 KiB
YAML
Raw Normal View History

name: Publish Docker Releases
# https://www.docker.com/blog/first-docker-github-action-is-here
2020-06-27 01:46:08 +00:00
# https://github.com/docker/build-push-action
on:
push:
branches: [master]
release:
types: [created]
jobs:
build-Conda:
runs-on: ubuntu-20.04
strategy:
2020-08-07 13:10:35 +00:00
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8]
pytorch_version: [1.3, 1.4, 1.5, 1.6]
2020-06-27 12:49:19 +00:00
exclude:
# excludes PT 1.3 as it is missing on pypi
2020-06-29 11:36:56 +00:00
- python_version: 3.8
2020-06-27 12:49:19 +00:00
pytorch_version: 1.3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get release version
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
id: get_version
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})
- name: Publish Releases to Docker
# only on releases
uses: docker/build-push-action@v1.1.0
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
with:
repository: pytorchlightning/pytorch_lightning
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: dockers/conda/Dockerfile
2020-06-27 01:46:08 +00:00
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ env.RELEASE_VERSION }}
tags: "${{ env.RELEASE_VERSION }}-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }},latest-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}"
timeout-minutes: 55