Skip to content

Workflow file for this run

name: Build and Push Docker Image to GitHub Container Registry
on:
release:
types: [published]
jobs:
build:
runs-on: karnot-arc-runner-set
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image to GitHub Container Registry
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/madara:latest
ghcr.io/${{ github.repository_owner }}/madara:${{ github.event.release.tag_name }}
labels: |
org.opencontainers.image.source=${{ github.repository.html_url }}
org.opencontainers.image.version=${{ github.event.release.tag_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Post successful message
run: echo "Docker image built and pushed successfully"