Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Deploy app using GitHub Action (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
alysivji authored Jul 4, 2020
1 parent 9f7471f commit 1b1744d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: pip install flake8 black isort
- name: Sort imports
run: isort --check -rc ./busy_beaver ./tests scripts
run: isort --check -c ./busy_beaver ./tests scripts
- name: Lint with Flake8
run: flake8 .
- name: Format code with black
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/deploy_app_to_kubernets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: deploy
on: [deployment]
jobs:
helm-upgrade:
runs-on: ubuntu-latest

env:
CHART_LOCATION: ./deployment/busybeaver
VALUES_FILES: ./deployment/values/production.yaml
RELEASE_NAME: busybeaver-production
RELEASE_TAG: ${{ github.event.deployment.ref }}
steps:
- uses: actions/checkout@v2
- name: Generate k8s config for DO
uses: matootie/[email protected]
with:
personalAccessToken: ${{ secrets.DIGITALOCEAN_TOKEN }}
clusterName: trapper
version: 1.6.6
expirationTime: 300 # seconds
- name: Use helm to deploy
run: helm upgrade $RELEASE_NAME $CHART_LOCATION -f $VALUES_FILE --set image.version=$RELEASE_TAG

- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: "${{ github.token }}"
state: "success"
deployment_id: ${{ github.event.deployment.id }}

- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: "${{ github.token }}"
state: "success"
deployment_id: ${{ github.event.deployment.id }}

0 comments on commit 1b1744d

Please sign in to comment.