Skip to content

Commit

Permalink
feat: setup-kalix-action initial release (#1)
Browse files Browse the repository at this point in the history
* feat: setup-kalix-action initial release

* adding license

* fixing github workflow

* git diff

* removing additional license

* compiled with x64 deps

* fixing readme

* Update README.md

Co-authored-by: Enno Runne <[email protected]>

* Update README.md

Co-authored-by: Enno Runne <[email protected]>

* Update README.md

Co-authored-by: Enno Runne <[email protected]>

---------

Co-authored-by: Enno Runne <[email protected]>
  • Loading branch information
aludwiko and ennru authored Jan 25, 2024
1 parent 4691124 commit 50e5b63
Show file tree
Hide file tree
Showing 8 changed files with 30,893 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.idea
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Kalix CLI for GitHub Actions

This [JavaScript action](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action) for GitHub workflows installs and configures the [Kalix CLI](https://docs.kalix.io/kalix/index.html) tool. After running this action, the `kalix` command is available in the workflow.

## Usage

The action takes two required parameters to authenticate and set the Kalix project ID:

* `token`: The Kalix authentication token
* `project-id`: The Kalix project ID you're using

## Example Workflow

The below flow shows how to use this action to list all services in your project

```yaml
name: kalix

on:
push:
branches: [ main ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Install Kalix CLI
uses: lightbend/setup-kalix-action@v1
with:
token: ${{ secrets.KALIX_TOKEN }}
project-id: ${{ vars.KALIX_PROJECT }}
```
## Building and developing
Follow the [instructions](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github) to build and push the action.
* run `npm i --target_arch=x64 --target_platform=linux`
* update index.js file with your changes
* run `ncc build index.js`
* commit sources and `dist` folder

## Contributing

We welcome all contributions! [Pull requests](https://github.com/lightbend/setup-kalix-action/pulls) are the preferred way to share your contributions. For major changes, please open [an issue](https://github.com/lightbend/setup-kalix-action/issues) first to discuss what you would like to change.

## Support

This project is an [incubator](https://doc.akka.io/docs/akka-dependencies/current/support-terminology.html#incubating)

## License

See the [LICENSE](./LICENSE)
7 changes: 7 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* Follow
* Create a [new release](https://github.com/lightbend/kalix-action/releases/new) with a new tag and the title equal to the tag
* Choose the version judiciously, as making the version a minor number bump will allow existing users to be upgraded seamlessly. A major number bump will force them to update their action. Follow this [instruction](https://docs.github.com/en/actions/creating-actions/about-custom-actions#using-release-management-for-actions)
* Update [README.md](README.md) to show the new tag
* Update [Kalix Docs](https://github.com/lightbend/kalix-docs/blob/fdfd537fdc5ca9eb2a828b947b99a2ab52dce163/docs/modules/operations/pages/integrate-cicd-github-actions.adoc) to
the major version
* Update [kalix-cicd-github-actions/README.md](https://github.com/lightbend/kalix-cicd-github-actions) to show the new tag
12 changes: 12 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Setup Kalix CLI'
description: 'Setup and basic configuration of the Kalix CLI'
inputs:
token:
description: 'Kalix refresh token, see: https://docs.kalix.io/operations/integrate-cicd.html#create_a_service_token'
required: true
project-id:
description: 'Kalix project id, check your project id with `kalix projects list`'
required: true
runs:
using: 'node20'
main: 'dist/index.js'
Loading

0 comments on commit 50e5b63

Please sign in to comment.