Skip to content

action to publish image on ghcr.io #4

action to publish image on ghcr.io

action to publish image on ghcr.io #4

name: Create Release
on:
push:
branches:
- main
jobs:
create-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Action
uses: actions/checkout@main
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Makefile Rule
run: |
COMMIT_HASH=${{ github.sha }}
IMAGE_NAME="federated_cvdm_training_poc:${COMMIT_HASH}"
docker build -t "${IMAGE_NAME}" .
- name: Push Docker image
run: |
COMMIT_HASH=${{ github.sha }}
IMAGE_NAME="federated_cvdm_training_poc:${COMMIT_HASH}"
docker push "${IMAGE_NAME}"