Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
chore: Add GitHub Actions workflow to build and publish Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcc1212 committed May 17, 2024
1 parent 1f045fc commit dd073d5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Publish Docker Image

on:
push:
branches:
- main

jobs:
build-mongo-api:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: nmcc1212
password: ${{ secrets.GHCR_PAT }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: newAPI/Dockerfile
push: true
tags: ghcr.io/nmcc1212/cacher:latest

0 comments on commit dd073d5

Please sign in to comment.