Skip to content

Commit c0f7984

Browse files
committed
feat: Add action
1 parent 23ef583 commit c0f7984

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/build.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Deploy SSR Image
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: "coreybruyere/coreybruyere-v4"
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Login to ghcr.io
22+
uses: docker/login-action@v2
23+
with:
24+
registry: ${{ env.REGISTRY }}
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build image and push to registry
29+
uses: docker/build-push-action@v4
30+
with:
31+
context: .
32+
file: Dockerfile
33+
platforms: linux/amd64
34+
push: true
35+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
36+
37+
- name: Deploy to Coolify
38+
run: |
39+
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'

0 commit comments

Comments
 (0)