Skip to content

Build Docker Image

Build Docker Image #24

name: Build Docker Image
on:
workflow_run:
workflows: ["CI"]
types:
- completed
jobs:
release:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/monorepo:latest
- name: Logout from Docker Hub
run: docker logout
- name: End
run: echo "Docker image pushed to Docker Hub successfully"