releasing 1.2.0 #86
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: "Build & Push Docker" | |
on: # Trigger the workflow on push or pull request, but only for the master branch | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
paths: | |
- "requirements/*" | |
- ".devcontainer/*" | |
- "environment.yml" | |
- "requirements.txt" | |
- ".github/workflows/*docker*.yml" | |
- "setup.py" | |
workflow_dispatch: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
env: | |
PUSH_RELEASE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' }} | |
jobs: | |
build-Devcontainer: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.9"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to DockerHub | |
if: env.PUSH_RELEASE == 'true' && github.repository_owner == 'Lightning-AI' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build (and Push) Devcontainer | |
# publish master/release | |
uses: docker/build-push-action@v4 | |
with: | |
build-args: | | |
VARIANT=${{ matrix.python_version }} | |
file: .devcontainer/Dockerfile | |
push: ${{ env.PUSH_RELEASE }} | |
tags: pytorchlightning/metrics-dev | |
timeout-minutes: 50 |