-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.09 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# For more details, read this: https://coolify.io/docs/github-actions
name: Build Static Image
on:
push:
branches: ["main"]
env:
IMAGE_NAME: "djsisson/portfolio"
jobs:
amd64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build image and push to registry
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: ${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:latest
- name: Deploy to Coolify
run: |
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' --header 'CF-Access-Client-Id: ${{ secrets.CF_ID }}' --header 'CF-Access-Client-Secret: ${{ secrets.CF_SECRET }}'