-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (60 loc) · 2.11 KB
/
ci.yaml
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
name: CI
on: push
jobs:
build:
uses: kausaltech/github-actions/.github/workflows/build.yaml@main
with:
project_id: watch-ui
project_type: nextjs
secrets:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
test:
needs: [build]
uses: ./.github/workflows/e2e-image.yaml
with:
image: ${{ needs.build.outputs.image }}:${{ needs.build.outputs.image_tag }}
instance_identifiers: sunnydale
backend_base_url: https://api.watch.kausal.tech/v1
build_id: ${{ needs.build.outputs.build_id }}
s3_endpoint: ${{ vars.BUILD_S3_ENDPOINT }}
s3_bucket: ${{ vars.BUILD_S3_BUCKET }}
secrets: inherit
deploy:
needs: [build]
uses: kausaltech/github-actions/.github/workflows/deploy.yaml@main
secrets:
gitops_pat: ${{ secrets.GHA_GITOPS_PAT }}
if: needs.build.outputs.deployment_env
with:
docker_image_repo: ${{ needs.build.outputs.image }}
docker_image_tag: ${{ needs.build.outputs.image_tag }}
project_id: watch-ui
build_id: ${{ needs.build.outputs.build_id }}
deployment_env: ${{ needs.build.outputs.deployment_env }}
deploy-dokku:
needs: [build, deploy]
runs-on: runner-prod
container:
image: harbor.kausal.tech/library/ubuntu:latest
steps:
# - name: ip addr
# run: ip addr
# - name: nc
# run: nc -zv 100.75.0.2 22
- name: Push to dokku
# uses: dokku/github-action@master
uses: docker://dokku/ci-docker-image:latest
with:
args: dokku-deploy
env:
# GIT_SSH_COMMAND: 'ssh -vvv'
# FIXME: Make configurable
GIT_REMOTE_URL: 'ssh://[email protected]:22/watch-dev'
SSH_PRIVATE_KEY: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
# DEPLOY_DOCKER_IMAGE: ${{ github.repository }}:${{ github.sha }}
DEPLOY_DOCKER_IMAGE: ${{ needs.build.outputs.image }}:${{ needs.build.outputs.image_tag }}
TRACE: '1'
# GIT_PUSH_FLAGS: -v