-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (71 loc) · 2.72 KB
/
build-containers.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# SPDX-FileCopyrightText: 2024 JWP Consulting GK
#
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Build all containers using Nix
on:
pull_request:
push:
branches:
- "main"
jobs:
projectify-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-up-nix-docker
with:
build_target: .#projectify-backend-container
package_name: projectify-backend
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
projectify-celery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-up-nix-docker
with:
build_target: .#projectify-celery-container
package_name: projectify-celery
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
projectify-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-up-nix-docker
with:
build_target: .#projectify-frontend-node-container
package_name: projectify-frontend-node
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
projectify-revproxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-up-nix-docker
with:
build_target: .#projectify-revproxy-container
package_name: projectify-revproxy
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
deploy-on-render:
# Only deplo if we are on main
if: ${{ github.ref_name == 'main' }}
needs:
- projectify-backend
- projectify-celery
- projectify-frontend
- projectify-revproxy
runs-on: ubuntu-latest
steps:
- name: Trigger deploy hooks
env:
deploy_backend_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL_PROJECTIFY_BACKEND }}
deploy_celery_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL_PROJECTIFY_CELERY }}
deploy_frontend_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL_PROJECTIFY_FRONTEND }}
deploy_revproxy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL_PROJECTIFY_REVPROXY }}
run: |
curl "$deploy_backend_url"
curl "$deploy_celery_url"
curl "$deploy_frontend_url"
curl "$deploy_revproxy_url"