Code Monkey home page Code Monkey logo

deploy-action's Introduction

Deploy Action

Deploys a helm chart to a Kubernetes cluster.

Install the dependencies

yarn install

Build the typescript

yarn build

Run the tests

yarn test

Usage

Example of deployment with helm based on a Github deployment trigger, that pushes releases to sentry and notifies Slack.

on: ['deployment']

#...

jobs:
  deploy:
    name: deploy ${{ github.event.deployment.payload.app }} to ${{ github.event.deployment.environment }}
    runs-on: ubuntu-latest
    steps:
      # ...
      - name: Check chart
        uses: minddocdev/deploy-action@master
        with:
          config: |
            {
              "app": "myApp",
              "appUrl": "https://myApp.minddoc.com",
              "chart": "myhelmrepo/myapp",
              "namespace": "apps",
              "release": "myapp",
              "valueFiles": [
                "myapp-values/values.yaml",
                "myapp-values/values-staging.yaml"
              ],
              "values": {
                "image": {
                  "tag": ${{ github.sha }}
                }
              }
            }
          # Or you could specify the config in the deployment payload, like:
          # config: ${{ github.event.deployment.payload }}
          environment: ${{ github.event.deployment.environment }}
          helmRepoName: myhelmrepo
          helmRepoUrl: https://raw.githubusercontent.com/mycompany/myhelmrepo/master/helm/releases
          helmRepoUsername: myhelmrepouser
          helmRepoPassword: ${{ secrets.HELM_REPO_TOKEN }}
          kubeConfig: |
            apiVersion: v1
            clusters:
            - cluster:
                certificate-authority-data: ${{ secrets.KUBE_CERT }}
                server: ${{ secrets.KUBE_SERVER }}
              name: myCluster
            contexts:
            - context:
                cluster: myCluster
                namespace: default
                user: ci
              name: myCluster
            current-context: myCluster
            kind: Config
            preferences: {}
            users:
            - name: ci
              user:
                token: ${{ secrets.KUBE_USER_TOKEN }}
          sentryAuthToken: ${{ secrets.SENTRY_AUTH_TOKEN }}
          sentryOrg: mysentryorg
          slackWebhook: ${{ secrets.SLACK_WEBHOOK }}

deploy-action's People

Contributors

darioblanco avatar nicolaspearson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.