Skip to content

Commit 0540f4e

Browse files
committed
feat: setup-akka-cli-action
1 parent bf4bff4 commit 0540f4e

8 files changed

+31123
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.idea

README.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Akka CLI for GitHub Actions
2+
3+
This [JavaScript action](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action) for
4+
GitHub workflows installs and configures the [Akka CLI](https://doc.akka.io/snapshots/akka-documentation/akka-cli/using-cli.html) tool. After running this action, the `akka`
5+
command is
6+
available in the workflow.
7+
8+
9+
10+
## Usage
11+
12+
The action takes two required parameters to authenticate and set the Akka project ID:
13+
14+
* `token`: The Akka authentication token
15+
* `project-id`: The Akka project ID you're using
16+
17+
## Example Workflow
18+
19+
The below flow shows how to use this action to list all services in your project
20+
21+
```yaml
22+
name: akka
23+
24+
on:
25+
push:
26+
branches: [ main ]
27+
28+
jobs:
29+
deploy:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Install Akka CLI
33+
uses: akka/setup-akka-cli-action@v1
34+
with:
35+
token: ${{ secrets.AKKA_TOKEN }}
36+
project-id: ${{ vars.AKKA_PROJECT_ID }}
37+
- name: List services
38+
run: akka service list
39+
```
40+
41+
## Building and developing
42+
43+
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.
44+
45+
* run `npm i --target_arch=x64 --target_platform=linux`
46+
* update index.js file with your changes
47+
* run `ncc build index.js`
48+
* commit sources and `dist` folder
49+
50+
## Contributing
51+
52+
We welcome all contributions! [Pull requests](https://github.com/akka/setup-akka-cli-action/pulls) are the preferred way to share your contributions. For major changes, please open [an issue](https://github.com/akka/setup-akka-cli-action/issues) first to discuss what you would like to change.
53+
54+
## Support
55+
56+
This project is an [incubator](https://doc.akka.io/docs/akka-dependencies/current/support-terminology.html#incubating)
57+
58+
## License
59+
60+
See the [LICENSE](./LICENSE)

RELEASING.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* Create a [new release](https://github.com/akka/setup-akka-cli-action/releases/new) with a new tag and the title equal to the tag
2+
* 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)
3+
* Move major version tag `v1` to the latest release, e.g. `v1` to `v1.0.2`.
4+
* When bumping the major version (e.g. from `v1` to `v2`), update the following:
5+
* [README.md](README.md)
6+
* [Akka Docs](https://doc.akka.io/snapshots/akka-documentation/operations/integrating-cicd/github-actions.html)

action.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Setup Akka CLI'
2+
description: 'Setup and basic configuration of the Akka CLI'
3+
branding:
4+
color: 'green'
5+
icon: zap
6+
inputs:
7+
token:
8+
#TODO fix docs url
9+
description: 'Akka refresh token, see: https://doc.akka.io/snapshots/akka-documentation/operations/integrating-cicd/index.html#create_a_service_token'
10+
required: true
11+
project-id:
12+
description: 'Akka project id, check your project id with `akka projects list`'
13+
required: true
14+
runs:
15+
using: 'node20'
16+
main: 'dist/index.js'

0 commit comments

Comments
 (0)