forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (52 loc) · 1.69 KB
/
build-and-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
55
56
name: AWS Build and Deploy
on:
push:
branches: ["staging", "production"]
jobs:
build-and-push:
permissions:
id-token: write
contents: read
checks: write
name: build-and-push
concurrency: ${{ github.ref }}
uses: ./.github/workflows/ecr.yml
with:
build_role: arn:aws:iam::458591407913:role/github-actions-ecr-thoughtbot-mastodon
ecr_repo: thoughtbot/thoughtbot-mastodon
deploy-staging:
if: ${{ endsWith(github.ref, 'staging') }}
permissions:
contents: read
id-token: write
actions: read
name: deploy-staging
needs: build-and-push
concurrency: ${{ github.ref }}
uses: ./.github/workflows/eks.yml
with:
cluster_name: thoughtbot-sandbox-v1
deploy_role: arn:aws:iam::181682000713:role/thoughtbot-mastodon-deploy
image_url: ${{ needs.build-and-push.outputs.image_url }}
manifest_path: ./deploy/staging
namespace: thoughtbot-mastodon-staging
registry_account: '458591407913'
version: ${{ needs.build-and-push.outputs.version }}
deploy-production:
if: ${{ endsWith(github.ref, 'production') }}
permissions:
contents: read
id-token: write
actions: read
name: deploy-production
needs: build-and-push
concurrency: ${{ github.ref }}
uses: ./.github/workflows/eks.yml
with:
cluster_name: thoughtbot-production-v1
deploy_role: arn:aws:iam::651913466569:role/thoughtbot-mastodon-deploy
image_url: ${{ needs.build-and-push.outputs.image_url }}
manifest_path: ./deploy/production
namespace: thoughtbot-mastodon-production
registry_account: '458591407913'
version: ${{ needs.build-and-push.outputs.version }}