-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (38 loc) · 1.38 KB
/
staging.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
name: 'Staging'
on:
workflow_call:
defaults:
run:
shell: bash
jobs:
deploy-staging:
name: 'Staging Deploy'
runs-on: ubuntu-latest
env:
IMAGE_NAME: ${{ github.repository }}
environment:
name: staging
url: https://studio-api-staging.cheqd.net
steps:
- name: Install DigitalOcean CLI
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Login to DOCR
run: doctl registry login --expiry-seconds 600
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download docker image
uses: actions/download-artifact@v4
with:
name: studio-staging
- name: Load Docker image
run: docker image load --input studio-staging.tar
- name: Push image to GitHub Container Registry
run: docker image push --all-tags ghcr.io/${{ env.IMAGE_NAME }}
- name: Push images to DOCR
run: docker image push --all-tags registry.digitalocean.com/${{ env.IMAGE_NAME }}