Skip to content

Merge pull request #9 from ntxinh/dependabot/github_actions/actions/c… #20

Merge pull request #9 from ntxinh/dependabot/github_actions/actions/c…

Merge pull request #9 from ntxinh/dependabot/github_actions/actions/c… #20

Workflow file for this run

name: Publish container
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
tags:
- "v*.*.*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
login:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Method 1
# -
# name: Docker Build and Push
# continue-on-error: true
# run: |
# docker build . --tag ghcr.io/ntxinh/aspnetcore-ddd:latest
# docker push ghcr.io/ntxinh/aspnetcore-ddd:latest
# Method 2
-
name: Docker Build and Push by Action
# continue-on-error: true
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/ntxinh/aspnetcore-ddd:latest
# Method 3:
# -
# name: Docker Build and Push by Docker Compose
# continue-on-error: true
# run: |
# docker compose build
# docker compose push