Skip to content

Test

Test #2419

Workflow file for this run

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:
# FIXME: Make configurable
# git_remote_url: 'ssh://[email protected]:22/watch-dev'
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 }}
# FIXME: remove after testing
git_push_flags: -v
trace: '1'
env:
GIT_SSH_COMMAND: 'ssh -vvv'