Skip to content

Commit 60c74a9

Browse files
committed
2 parents 7058c6d + b030b89 commit 60c74a9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
env:
9+
IMAGE_REPO: "ghcr.io"
10+
IMAGE_NAME: "jozi/product-name-ai"
11+
IMAGE_TAG: "${{ github.ref_name }}"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v2
25+
26+
- name: Log in to Docker Registry
27+
uses: docker/login-action@v2
28+
with:
29+
registry: ${{ env.IMAGE_REPO }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build Docker image
34+
run: |
35+
docker build -t ${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} .
36+
37+
- name: Push Docker image
38+
run: |
39+
docker push ${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}

0 commit comments

Comments
 (0)