Skip to content

Bump docker/build-push-action from 6.15.0 to 7.3.0 (#750) #141

Bump docker/build-push-action from 6.15.0 to 7.3.0 (#750)

Bump docker/build-push-action from 6.15.0 to 7.3.0 (#750) #141

Workflow file for this run

name: docker
on:
release:
types: [published]
push:
branches:
- main
paths:
- Dockerfile
- .github/workflows/docker.yml
pull_request:
branches:
- main
paths:
- Dockerfile
- .github/workflows/docker.yml
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.1
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302
with:
images: vectorinstitute/cyclops
- name: Build and push Docker image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}