Skip to content

Commit

Permalink
Added workflow to create docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-aravind committed Oct 17, 2024
1 parent 1b6bb44 commit 9941fe1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/create-docker-image-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Docker Image to GHCR

on:
release:
types:
- published
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/artsdata-rdf-fetcher

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 9941fe1

Please sign in to comment.