Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
/ login Public archive

Github action to login to your Okteto Cloud account with an API token

License

Notifications You must be signed in to change notification settings

okteto/login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ CAUTION: DEPRECATED GITHUB ACTION ⚠️

Important Notice

🚨 This GitHub Action is deprecated in favor of https://github.com/okteto/context

This GitHub Action is now deprecated and will no longer receive updates or maintenance. We recommend that you use the context action instead.

Please consider the following points before continuing to use this action:

  1. No Future Updates: There will be no further updates, improvements, or bug fixes.
  2. Potential Security Risks: Without updates, this action may become vulnerable to security risks.
  3. Compatibility Issues: Future changes to GitHub Actions or dependencies may cause this action to break or function improperly.
  4. No Support: We will no longer provide support for any issues or questions related to this action.

Learn more about our support for GitHub Actions in our documentation.


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 Okteto Cloud Login

With the Okteto Cloud Login action you can automate you workflow to do an Okteto Cloud login using an API token. This action is a prerequisite for the rest of the Okteto Cloud actions.

Configure your Okteto API Token

Copy your Okteto API token and save it as a secret with the name OKTETO_TOKEN in the GitHub repository.

Inputs

token

Required Your Okteto API token.

url

Your Okteto Enterprise URL. Use this to run your actions in your Okteto Enterprise instance (https://okteto.com/enterprise).

Example usage

This example runs the login action and then activates a namespace.

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

name: example

jobs:

  devflow:
    runs-on: ubuntu-latest
    steps:
    
    - uses: okteto/login@latest
      with:
        token: ${{ secrets.OKTETO_TOKEN }}
    
    - uses: okteto/namespace@latest
      with:
        name: cindylopez

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@latest
      with:
        token: ${{ secrets.OKTETO_TOKEN }}
    
    - uses: okteto/namespace@latest
      with:
        name: cindylopez