forked from tuist/tuist
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (68 loc) · 1.98 KB
/
cache-deploy.yml
File metadata and controls
74 lines (68 loc) · 1.98 KB
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
74
name: Cache Deploy
on:
workflow_dispatch:
push:
branches:
- main
paths:
- cache/**
- tuist_common/**
- .github/workflows/cache-deploy.yml
concurrency:
group: cache-deploy
cancel-in-progress: false
permissions:
contents: read
defaults:
run:
working-directory: cache
env:
MISE_VERSION: "2026.4.18"
MISE_GITHUB_TOKEN: ${{ github.token }}
jobs:
deploy-canary:
runs-on: namespace-profile-default
timeout-minutes: 30
environment: cache-canary
steps:
- uses: actions/checkout@v4
- uses: 1password/install-cli-action@v2
- uses: jdx/mise-action@v4.0.1
with:
version: ${{ env.MISE_VERSION }}
cache_key: "{{default}}-{{env.NSC_BASE_IMAGE_REF_ID}}"
working_directory: cache
- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.CACHE_SSH_PRIVATE_KEY }}
- name: Deploy with Kamal
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.CACHE_OP_SERVICE_ACCOUNT_TOKEN }}
SECRETS: ${{ secrets.CACHE_KAMAL_SECRETS }}
run: |
mise run deploy canary
deploy-production:
runs-on: namespace-profile-default
timeout-minutes: 30
needs: deploy-canary
if: ${{ needs.deploy-canary.result == 'success' }}
environment: cache-production
steps:
- uses: actions/checkout@v4
- uses: 1password/install-cli-action@v2
- uses: jdx/mise-action@v4.0.1
with:
version: ${{ env.MISE_VERSION }}
cache_key: "{{default}}-{{env.NSC_BASE_IMAGE_REF_ID}}"
working_directory: cache
- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.CACHE_SSH_PRIVATE_KEY }}
- name: Deploy with Kamal
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.CACHE_OP_SERVICE_ACCOUNT_TOKEN }}
SECRETS: ${{ secrets.CACHE_KAMAL_SECRETS }}
run: |
mise run deploy production