-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.42 KB
/
deploy.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: "Deployment"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deployment:
name: 🚀 GCP Deploy
runs-on: ubuntu-latest
steps:
# This step creates a new deployment, check them out here:
# https://github.com/Khenziii/croissantdealer/deployments
- name: Start Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.TOKEN_GITHUB }}
env: Production
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Docker Build
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: khenzii
password: ${{ secrets.DOCKER_PAT }}
- name: Docker Build & Push
uses: docker/build-push-action@v5
with:
push: true
tags: khenzii/croissantdealer:latest
- name: Trigger Deployment Webhook
run: |
curl -X POST -d {} "${{ secrets.DEPLOY_WEBHOOK_URL }}" -H "Content-Type: application/json"
- name: Update Deployment Status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
token: ${{ secrets.TOKEN_GITHUB }}
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}