This action enabbles you to interact with Upbound by installing the up CLI.
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
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!
-
🛠️ Install the dependencies
npm install
-
🏗️ Package the JavaScript for distribution
npm run bundle
-
✅ 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) ...