Code Monkey home page Code Monkey logo

push's Introduction

GitHub Actions for Okteto Cloud

Automate your development workflows using Github Actions and Okteto Cloud

GitHub Actions gives you the flexibility to build an automated software development workflows. With GitHub Actions for Okteto Cloud you can create workflows to build, deploy and update your applications in Okteto Cloud.

Get started today with a free Okteto Cloud account!

Github Action for Pushing your Changes to Okteto Cloud

You can use this action to automatically build your container, push it to the Okteto Registry and deploy it into Okteto Cloud. This is a great way to create preview environments for your pull requests.

This document has more information on this workflow.

Inputs

namespace

The Okteto namespace to use. If not specified it will use the namespace specified by the namespace action.

name

The name of the deployment. If not specified it will use the one in your okteto.yml file.

deploy

Create the deployment if it doesn't exist. If not specified the action will fail if the deployment doesn't exist.

working-directory

The working directory of the action. Defaults to the root folder of the repo.

Example usage

This example runs the login action, activates a namespace, deploys a kubernetes application and then pushes your changes.

# File: .github/workflows/workflow.yml
on: [push]

name: example

jobs:

  devflow:
    runs-on: ubuntu-latest
    steps:
    
    - uses: okteto/login@master
      with:
        token: ${{ secrets.OKTETO_TOKEN }}
    
    - name: "Activate Namespace"
      uses: okteto/namespace@master
      with:
        name: cindylopez
    
    - name: "Deploy application"
      uses: okteto/apply@master
      with:
        namespace: cindylopez
        manifest: k8s.yaml

    - name: "Push changes"
      uses: okteto/push@master
      with:
        namespace: cindylopez
        name: hello-world

Advanced usage

Custom Certification Authorities or Self-signed certificates

You can specify a custom certificate authority or a self-signed certificate by setting the OKTETO_CA_CERT environment variable. When this variable is set, the action will install the certificate in the container, and then execute the action.

Use this option if you're using a private Certificate Authority or a self-signed certificate in your Okteto Enterprise instance. We recommend that you store the certificate as an encrypted secret, and that you define the environment variable for the entire job, instead of doing it on every step.

# File: .github/workflows/workflow.yml
on: [push]

name: example

jobs:
  devflow:
    runs-on: ubuntu-latest
    env:
      OKTETO_CA_CERT: ${{ secrets.OKTETO_CA_CERT }}
    steps:
    
    - uses: okteto/login@master
      with:
        token: ${{ secrets.OKTETO_TOKEN }}
    
  - name: "Activate Namespace"
     uses: okteto/namespace@master
     with:
       name: cindylopez
   
   - name: "Deploy application"
     uses: okteto/apply@master
     with:
       namespace: cindylopez
       manifest: k8s.yaml

   - name: "Push changes"
     uses: okteto/push@master
     with:
       namespace: cindylopez
       name: hello-world

push's People

Contributors

rberrelleza avatar pchico83 avatar jlopezbarb 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.