Skip to content

Commit d5e5f06

Browse files
chore: init project (#1)
1 parent f851b0d commit d5e5f06

File tree

11 files changed

+3073
-1
lines changed

11 files changed

+3073
-1
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/branch.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: branch
2+
on:
3+
push:
4+
branches-ignore:
5+
- main
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: set up node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
cache: yarn
19+
20+
- name: get dependencies
21+
run: yarn
22+
23+
- name: build
24+
run: yarn build
25+
26+
- name: test action
27+
uses: ./
28+
29+
- name: test kustomize
30+
run: kustomize version

.github/workflows/codeql-analysis.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '41 21 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v2
26+
with:
27+
languages: javascript
28+
29+
- name: Autobuild
30+
uses: github/codeql-action/autobuild@v2
31+
32+
- name: Perform CodeQL Analysis
33+
uses: github/codeql-action/analyze@v2

.github/workflows/main.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: main
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: configure git
15+
run: |
16+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
17+
git config --global user.name "${{ github.actor }}"
18+
19+
- name: set up node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 16
23+
cache: yarn
24+
25+
- name: get dependencies
26+
run: yarn
27+
28+
- name: build
29+
run: yarn build
30+
31+
- name: show changes
32+
run: git status
33+
34+
- name: semver
35+
id: semver
36+
uses: grumpy-programmer/conventional-commits-semver-release@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
init-version: 1.0.0
41+
42+
- name: commit and push change
43+
if: ${{ steps.semver.outputs.released == 'true' }}
44+
env:
45+
VERSION: ${{ steps.semver.outputs.version }}
46+
run: |
47+
git add dist
48+
git diff-index --quiet HEAD || git commit -m "Release ${VERSION}"
49+
git push
50+
51+
- name: update tag
52+
if: ${{ steps.semver.outputs.released == 'true' }}
53+
env:
54+
TAG: ${{ steps.semver.outputs.tag-prefix }}${{ steps.semver.outputs.version-major }}
55+
run: |
56+
git tag -f ${TAG}
57+
git push origin ${TAG} --force

.gitignore

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
2+
### Linux template
3+
*~
4+
5+
# temporary files which can be created if a process still has a handle open of a deleted file
6+
.fuse_hidden*
7+
8+
# KDE directory preferences
9+
.directory
10+
11+
# Linux trash folder which might appear on any partition or disk
12+
.Trash-*
13+
14+
# .nfs files are created when an open file is removed but is still being accessed
15+
.nfs*
16+
17+
### macOS template
18+
# General
19+
.DS_Store
20+
.AppleDouble
21+
.LSOverride
22+
23+
# Icon must end with two \r
24+
Icon
25+
26+
# Thumbnails
27+
._*
28+
29+
# Files that might appear in the root of a volume
30+
.DocumentRevisions-V100
31+
.fseventsd
32+
.Spotlight-V100
33+
.TemporaryItems
34+
.Trashes
35+
.VolumeIcon.icns
36+
.com.apple.timemachine.donotpresent
37+
38+
# Directories potentially created on remote AFP share
39+
.AppleDB
40+
.AppleDesktop
41+
Network Trash Folder
42+
Temporary Items
43+
.apdisk
44+
45+
### Windows template
46+
# Windows thumbnail cache files
47+
Thumbs.db
48+
Thumbs.db:encryptable
49+
ehthumbs.db
50+
ehthumbs_vista.db
51+
52+
# Dump file
53+
*.stackdump
54+
55+
# Folder config file
56+
[Dd]esktop.ini
57+
58+
# Recycle Bin used on file shares
59+
$RECYCLE.BIN/
60+
61+
# Windows Installer files
62+
*.cab
63+
*.msi
64+
*.msix
65+
*.msm
66+
*.msp
67+
68+
# Windows shortcuts
69+
*.lnk
70+
71+
### Node template
72+
# Logs
73+
logs
74+
*.log
75+
npm-debug.log*
76+
yarn-debug.log*
77+
yarn-error.log*
78+
lerna-debug.log*
79+
80+
# Diagnostic reports (https://nodejs.org/api/report.html)
81+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
82+
83+
# Runtime data
84+
pids
85+
*.pid
86+
*.seed
87+
*.pid.lock
88+
89+
# Directory for instrumented libs generated by jscoverage/JSCover
90+
lib-cov
91+
92+
# Coverage directory used by tools like istanbul
93+
coverage
94+
*.lcov
95+
96+
# nyc test coverage
97+
.nyc_output
98+
99+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
100+
.grunt
101+
102+
# Bower dependency directory (https://bower.io/)
103+
bower_components
104+
105+
# node-waf configuration
106+
.lock-wscript
107+
108+
# Compiled binary addons (https://nodejs.org/api/addons.html)
109+
build/Release
110+
111+
# Dependency directories
112+
node_modules/
113+
jspm_packages/
114+
115+
# TypeScript v1 declaration files
116+
typings/
117+
118+
# TypeScript cache
119+
*.tsbuildinfo
120+
121+
# Optional npm cache directory
122+
.npm
123+
124+
# Optional eslint cache
125+
.eslintcache
126+
127+
# Optional REPL history
128+
.node_repl_history
129+
130+
# Output of 'npm pack'
131+
*.tgz
132+
133+
# Yarn Integrity file
134+
.yarn-integrity
135+
136+
# dotenv environment variables file
137+
.env
138+
.env.test
139+
140+
# parcel-bundler cache (https://parceljs.org/)
141+
.cache
142+
143+
# next.js build output
144+
.next
145+
146+
# nuxt.js build output
147+
.nuxt
148+
149+
# vuepress build output
150+
.vuepress/dist
151+
152+
# Serverless directories
153+
.serverless/
154+
155+
# FuseBox cache
156+
.fusebox/
157+
158+
# DynamoDB Local files
159+
.dynamodb/
160+
161+
### Example user template template
162+
### Example user template
163+
164+
# IntelliJ project files
165+
.idea
166+
*.iml
167+
out
168+
gen
169+
170+
### Custom
171+
!dist/node_modules

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
# setup-k8s-kustomize
1+
# Setup k8s kustomize [![main](https://github.com/grumpy-programmer/setup-k8s-kustomize/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/grumpy-programmer/setup-k8s-kustomize/actions/workflows/main.yml)
2+
3+
GitHub action for setup kubernetes [kustomize](https://github.com/kubernetes-sigs/kustomize)
4+
5+
## Usage
6+
7+
With latest version of kustomize
8+
9+
```
10+
- name: setup-k8s-kustomize
11+
uses: grumpy-programmer/setup-k8s-kustomize@v1
12+
```
13+
14+
With specific version of kustomize
15+
16+
```
17+
- name: setup-k8s-kustomize
18+
uses: grumpy-programmer/setup-k8s-kustomize@v1
19+
with:
20+
version: 4.5.4
21+
```

action.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Setup k8s kustomize
2+
description: GitHub action for setup kubernetes kustomize
3+
author: Grumpy Programmer
4+
branding:
5+
icon: anchor
6+
color: blue
7+
inputs:
8+
version:
9+
description: Specific version of kustomize to be installed, example 4.5.4
10+
required: false
11+
default: latest
12+
token:
13+
description: Github token. Since there's a default, this is typically not supplied by the user.
14+
default: ${{ github.token }}
15+
required: false
16+
runs:
17+
using: node16
18+
main: dist/main/index.js

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "setup-k8s-kustomize",
3+
"description": "GitHub Action for setup Kubernetes Kustomize",
4+
"repository": "git@github.com:grumpy-programmer/setup-k8s-kustomize.git",
5+
"author": "Grumpy Programmer",
6+
"license": "MIT",
7+
"scripts": {
8+
"build:main": "ncc build src/main.ts -o dist/main",
9+
"prebuild": "rm -rf dist",
10+
"build": "npm-run-all -p build:main",
11+
"watch:main": "ncc build --watch src/main.ts -o dist/main",
12+
"watch": "npm-run-all -p watch:main",
13+
"upgrade": "ncu -u"
14+
},
15+
"dependencies": {
16+
"@actions/core": "^1.7.0",
17+
"@actions/github": "^5.0.1",
18+
"@actions/tool-cache": "^1.7.2"
19+
},
20+
"devDependencies": {
21+
"@types/node": "^17.0.29",
22+
"@vercel/ncc": "^0.33.4",
23+
"npm-check-updates": "^12.5.9",
24+
"npm-run-all": "^4.1.5",
25+
"typescript": "^4.6.3"
26+
}
27+
}

0 commit comments

Comments
 (0)