Skip to content

Build and push Docker image #136

Build and push Docker image

Build and push Docker image #136

Workflow file for this run

name: Build and push Docker image
on:
workflow_run:
workflows: [Halyard-star CI]
branches: ['v*']
types:
- completed
workflow_dispatch:
jobs:
push_image:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/pulquero/halyard
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: docker
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}