Skip to content

Build/Push Docker Image to ghcr #4

Build/Push Docker Image to ghcr

Build/Push Docker Image to ghcr #4

Workflow file for this run

name: Build/Push Docker Image to ghcr
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: karnot-arc-runner-set
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- 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
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 }}
- name: Post successful message
run: echo "Docker image built and pushed successfully"