Skip to content

Latest commit

 

History

History
70 lines (54 loc) · 1.99 KB

README.md

File metadata and controls

70 lines (54 loc) · 1.99 KB

GitHub Actions for Upbound - up

This action enabbles you to interact with Upbound by installing the up CLI.

Usage

To install the latest version of up and use it in GitHub Actions workflows, create an Upbound API token, add it as a secret to your repository, and add the following step to your workflow:

- name: Install and login with up
  uses: upbound/action-up@v1
  with:
    api-token: ${{ secrets.UP_API_TOKEN }}
    organization: my-org

up will now be available in the environement and can be used in following steps. As an example, you can set your Upbound context:

- name: Install and login with up
  uses: upbound/action-up@v1
  with:
    api-token: ${{ secrets.UP_API_TOKEN }}
    organization: my-org

- name: Set Upbound context
  run: up ctx my-org/upbound-gcp-us-west-1/default/my-ctp

Contributing

Note

You'll need to have a reasonably modern version of Node.js handy. If you are using a version manager like nodenv or nvm, you can run nodenv install in the root of your repository to install the version specified in package.json. Otherwise, 20.x or later should work!

  1. 🛠️ Install the dependencies

    npm install
  2. 🏗️ Package the JavaScript for distribution

    npm run bundle
  3. ✅ Run the tests

    $ npm test
    PASS  __tests__/main.test.js
     action
       ✓ installs the up cli successfully (2 ms)
       ✓ installs the up cli successfully without a v in front of the version (1 ms)
    
    PASS  __tests__/index.test.js
     index
       ✓ calls run when imported (1 ms)
    ...