Skip to content

Bump docker/build-push-action from 5 to 6 (#166) #327

Bump docker/build-push-action from 5 to 6 (#166)

Bump docker/build-push-action from 5 to 6 (#166) #327

Workflow file for this run

name: Building dockers
on: # Trigger the workflow on push or pull request, but only for the master branch
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "actions/**"
# based on https://github.com/pypa/gh-action-pypi-publish
jobs:
docker-build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
pytorch_version: ["1.13.1", "2.0.1", "2.2.1"]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: ${{ github.repository_owner == 'Lightning-AI' && github.event_name == 'push' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Publish Docker Hub
# publish master/release
uses: docker/build-push-action@v6
with:
build-args: |
PYTORCH_VERSION=${{ matrix.pytorch_version }}
file: _actions/Dockerfile
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
tags: pytorchlightning/ecosystem-ci:pt${{ matrix.pytorch_version }}
timeout-minutes: 25