Skip to content

Publish Docker image #82

Publish Docker image

Publish Docker image #82

Workflow file for this run

name: Publish Docker image
'on':
push:
branches:
- main
schedule:
- cron: "0 12 * * *"
jobs:
push_to_registry:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166
with:
images: hedge10/minio-gh-workflow
tags: |
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}