Skip to content

Bump docker/build-push-action from 4 to 5 #21

Bump docker/build-push-action from 4 to 5

Bump docker/build-push-action from 4 to 5 #21

Workflow file for this run

name: Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ "published" ]
jobs:
test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build
uses: docker/build-push-action@v5
with:
push: false
tags: mrbuche/statmechcrack:test
latest:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: login
uses: docker/login-action@v2
with:
username: mrbuche
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build-push
uses: docker/build-push-action@v5
with:
push: true
tags: mrbuche/statmechcrack:latest
versioned:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: checkout
uses: actions/checkout@v4
- name: login
uses: docker/login-action@v2
with:
username: mrbuche
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build-push
uses: docker/build-push-action@v5
with:
push: true
tags: |
mrbuche/statmechcrack:${{steps.tag.outputs.tag}}
mrbuche/statmechcrack:latest
ghcr.io/sandialabs/statmechcrack:${{steps.tag.outputs.tag}}
ghcr.io/sandialabs/statmechcrack:latest