diff --git a/.github/workflows/build-publish-docker-image.yml b/.github/workflows/build-publish-docker-image.yml new file mode 100644 index 0000000..945901e --- /dev/null +++ b/.github/workflows/build-publish-docker-image.yml @@ -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