-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.12 KB
/
part_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
on:
workflow_call:
secrets:
FLY_API_TOKEN:
required: true
SENTRY_AUTH_TOKEN:
required: true
name: "Deploy"
jobs:
fly_deploy:
name: "Deploy to Fly.io"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Pull Image"
run: docker pull ghcr.io/${{ github.repository }}:${GITHUB_SHA}
# Secrets are maintained manually using flyctl
- uses: superfly/flyctl-actions@1.4
with:
args: "deploy -i ghcr.io/${{ github.repository }}:${GITHUB_SHA} --env SENTRY_RELEASE=${GITHUB_SHA}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: athena-logistics
SENTRY_PROJECT: backend
with:
environment: production