feat: enhance Docker workflow to support logging in and pushing images to Docker Hub; update README with new run command options
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m11s
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m11s
This commit is contained in:
22
.github/workflows/monolith.yml
vendored
22
.github/workflows/monolith.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
env:
|
||||
REGISTRY_URL: gitea.kobim.cloud
|
||||
DOCKERHUB_USERNAME: kobimex
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -18,20 +19,37 @@ jobs:
|
||||
- name: Setup Docker Environment
|
||||
uses: ./.github/actions/setup-docker-environment
|
||||
|
||||
- name: Log in to Docker registry
|
||||
- name: Log in to custom Docker registry
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY_URL }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push Docker image to custom registry
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY_URL }}/${{ github.repository_owner }}/${{ github.event.repository.name }}-monolith:latest
|
||||
file: ./Monolith.dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
username: ${{ env.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image to Docker Hub
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ env.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-monolith:latest
|
||||
file: ./Monolith.dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
Reference in New Issue
Block a user