Skip to content

Commit 009d886

Browse files
committed
initial entry
1 parent 0ec6285 commit 009d886

10 files changed

+5835
-4641
lines changed

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,8 @@ Thumbs.db
9696

9797
# Ignore built ts files
9898
__tests__/runner/*
99-
lib/**/*
99+
lib/**/*
100+
101+
/t/*
102+
/*/t/*
103+

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Change Log
2+
3+
All notable changes to the "action-setup-acctl" will be documented in this file.
4+
5+
## v0.1.0
6+
- Initial release

README.md

+18-81
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,38 @@
11
<p align="center">
2-
<a href="https://github.com/actions/typescript-action/actions"><img alt="typescript-action status" src="https://github.com/actions/typescript-action/workflows/build-test/badge.svg"></a>
2+
<a href="https://github.com/yokawasa/action-setup-kube-tools/actions"><img alt="action-setup-kube-tools status" src="https://github.com/yokawasa/action-setup-kube-tools/workflows/build-test/badge.svg"></a>
33
</p>
44

5-
# Create a JavaScript Action using TypeScript
5+
# action-setup-kube-tools
66

7-
Use this template to bootstrap the creation of a JavaScript action.:rocket:
7+
A GitHub Action that install Kubernetes tools (kubectl, kustomize, helm, kubeval, conftest, yq) and cache them on the runner
88

9-
This template includes compilication support, tests, a validation workflow, publishing, and versioning guidance.
9+
## Usage
1010

11-
If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
11+
### Inputs
1212

13-
## Create an action from this template
13+
> Supported Environments: Linux
1414
15-
Click the `Use this Template` and provide the new repo details for your action
15+
### Sample Workflow
1616

17-
## Code in Master
17+
18+
## Developing the action
1819

1920
Install the dependencies
2021
```bash
21-
$ npm install
22+
npm install
2223
```
2324

24-
Build the typescript and package it for distribution
25+
Build the typescript and package it for distribution by running [ncc](https://github.com/zeit/ncc)
2526
```bash
26-
$ npm run build && npm run pack
27+
npm run build && npm run pack
2728
```
2829

29-
Run the tests :heavy_check_mark:
30-
```bash
31-
$ npm test
32-
33-
PASS ./index.test.js
34-
✓ throws invalid number (3ms)
35-
wait 500 ms (504ms)
36-
test runs (95ms)
37-
38-
...
30+
Finally push the resutls
3931
```
40-
41-
## Change action.yml
42-
43-
The action.yml contains defines the inputs and output for your action.
44-
45-
Update the action.yml with your name, description, inputs and outputs for your action.
46-
47-
See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions)
48-
49-
## Change the Code
50-
51-
Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
52-
53-
```javascript
54-
import * as core from '@actions/core';
55-
...
56-
57-
async function run() {
58-
try {
59-
...
60-
}
61-
catch (error) {
62-
core.setFailed(error.message);
63-
}
64-
}
65-
66-
run()
32+
git add dist
33+
git commit -a -m "prod dependencies"
34+
git push origin releases/v0.1.0
6735
```
6836

69-
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
70-
71-
## Publish to a distribution branch
72-
73-
Actions are run from GitHub repos so we will checkin the packed dist folder.
74-
75-
Then run [ncc](https://github.com/zeit/ncc) and push the results:
76-
```bash
77-
$ npm run pack
78-
$ git add dist
79-
$ git commit -a -m "prod dependencies"
80-
$ git push origin releases/v1
81-
```
82-
83-
Your action is now published! :rocket:
84-
85-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
86-
87-
## Validate
88-
89-
You can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml)])
90-
91-
```yaml
92-
uses: ./
93-
with:
94-
milliseconds: 1000
95-
```
96-
97-
See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
98-
99-
## Usage:
100-
101-
After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and latest V1 action
37+
## Contributing
38+
Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/action-setup-kube-tools

action.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
name: 'Your name here'
2-
description: 'Provide a description here'
3-
author: 'Your name or organization here'
1+
name: 'Kubernetes toolset installer'
2+
description: 'Github Action that install Kubernetes tools (kubectl, kustomize, helm, kubeval, conftest, yq) and cache them on the runner'
3+
author: 'Yoichi Kawasaki @yokawasa'
44
inputs:
5-
myInput: # change this
6-
description: 'input description here'
7-
default: 'default value if applicable'
5+
kubectl:
6+
description: 'kubectl version'
7+
kustomize:
8+
description: 'kustomize version'
9+
helm:
10+
description: 'helm version'
11+
helmv3:
12+
description: 'helm3 version'
13+
kubeval:
14+
description: 'kubeval version'
15+
conftest:
16+
description: 'conftest version'
17+
branding:
18+
icon: 'terminal'
19+
color: 'blue'
820
runs:
921
using: 'node12'
1022
main: 'dist/index.js'

0 commit comments

Comments
 (0)