Code Monkey home page Code Monkey logo

github-actions's Introduction

GitHub Actions for Cloud 66 Toolbelt

This repository contains GitHub Actions for Cloud 66 Toolbelt, which would allow users to perform common tasks available through cx (such as deployment), using GitHub Actions.

Usage

Below have been provided two example workflows, which demonstrate the two ways in which Cloud 66 Toolbelt commands can be passed to the Cloud 66 GitHub Action. Both result in redeployment of a Cloud 66 stack, named "my_stack".

The first option is to provide the name of the stack as an environment variable and to pass the cx command as an argument, containing the name of the environment variable, as can be seen below:

workflow "New workflow" {
  on = "push"
  resolves = ["cloud66"]
}

action "cloud66" {
  uses = "./.cloud66/cx"
  secrets = ["CLOUD66_TOKEN"]
  args = "redeploy --stack CLOUD66_STACK -y --listen"
  env = {
    CLOUD66_STACK = "my-stack"
  }
}

The second option is to pass the cx command and the name of the stack together as an argument. This would look like this:

workflow "New workflow" {
  on = "push"
  resolves = ["cloud66"]
}

action "cloud66" {
  uses = "./.cloud66/cx"
  args = "redeploy --stack my-stack -y --listen"
  secrets = ["CLOUD66_TOKEN"]
}

Secrets

Both options would need the content of the cx token file to be passed as a secret. This would enable cx. The content can be accessed by running the cx dump-token | base64 command on your local device. The result can then be used as a value of a secret with key CLOUD66_TOKEN. Note that the name of the secret cannot be anything else, since cx will not recognise it.

Environment Variables

The use of environment variables is a matter of personal choice, since anything that is passed as an environment variable, can also be directly provided in the arguments part.

In this case, this is CLOUD66_STACK = "my-stack" in the first example and there is no environment variable in the second example.

License

See LICENSE

github-actions's People

Contributors

ksaykova avatar oceanelf avatar gildemberg-santos avatar lvangool avatar kasia66 avatar

Stargazers

Francisco Alexandre 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.