mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 05:25:42 +07:00
feat: add GitHub Actions workflow for Docker image build and publish to GHCR and Docker Hub.
This commit is contained in:
5
.github/workflows/docker-publish.yml
vendored
5
.github/workflows/docker-publish.yml
vendored
@@ -13,6 +13,9 @@ env:
|
||||
REGISTRY: ghcr.io
|
||||
# github.repository as <account>/<repo>
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
# Map secrets to env for availability in 'if' conditions
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -41,7 +44,7 @@ jobs:
|
||||
|
||||
# Login against Docker Hub (Optional fallback if secrets exist)
|
||||
- name: Log into Docker Hub
|
||||
if: github.event_name != 'pull_request' && secrets.DOCKER_USERNAME != ''
|
||||
if: github.event_name != 'pull_request' && env.DOCKER_USERNAME != ''
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: docker.io
|
||||
|
||||
Reference in New Issue
Block a user