Skip to content

Commit

Permalink
feat: create build-publish-docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt authored Oct 16, 2023
1 parent 7635ccd commit 599cd23
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Publish Docker Image (Manual)
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch name to publish'
required: true
push:
branches:
- develop

env:
REGISTRY: ghcr.io
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.repository_name }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ github.event.inputs.branch }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
dockerfile: Dockerfile.production

0 comments on commit 599cd23

Please sign in to comment.