Skip to content

Commit 922691a

Browse files
authored
initial implementation (#4)
* initial implementation
1 parent 9d1f093 commit 922691a

33 files changed

+33041
-28
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = crlf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false

.eslintrc.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"node": true,
5+
"jest/globals": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"prettier",
10+
"plugin:@typescript-eslint/recommended"
11+
],
12+
"overrides": [],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module"
17+
},
18+
"plugins": ["@typescript-eslint", "jest", "import", "sort-destructure-keys"],
19+
"rules": {
20+
"@typescript-eslint/interface-name-prefix": "off",
21+
"@typescript-eslint/no-use-before-define": "warn",
22+
"import/order": [
23+
"error",
24+
{
25+
"alphabetize": { "order": "asc", "caseInsensitive": true },
26+
"groups": [
27+
"builtin",
28+
"external",
29+
"internal",
30+
"parent",
31+
"sibling",
32+
"index"
33+
],
34+
"newlines-between": "always",
35+
"pathGroups": []
36+
}
37+
]
38+
}
39+
}
40+

.github/workflows/auto-release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ jobs:
1111
publish:
1212
runs-on: ubuntu-latest
1313
steps:
14-
# Get PR from merged commit to master
14+
# Get PR from merged commit to main
1515
- uses: actions-ecosystem/action-get-merged-pull-request@v1
1616
id: get-merged-pull-request
1717
with:
1818
github_token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
19+
1920
# Drafts your next Release notes as Pull Requests are merged into "main"
2021
- uses: release-drafter/release-drafter@v5
2122
with:
22-
publish: ${{ !contains(steps.get-merged-pull-request.outputs.labels, 'no-release') }}
23+
publish: false
2324
prerelease: false
2425
config-name: auto-release.yml
2526
env:

.github/workflows/main.yml

+28-6
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v3
10+
with:
11+
repository: ${{ github.event.pull_request.head.repo.full_name }}
12+
ref: ${{ github.event.pull_request.head.ref }}
1013

1114
- uses: actions/setup-node@v3
1215
with:
13-
node-version: 16
14-
cache: "yarn"
16+
node-version-file: package.json
17+
cache: yarn
1518

1619
- name: Install Dependencies
1720
run: yarn --frozen-lockfile --prefer-offline
@@ -26,17 +29,36 @@ jobs:
2629
run: yarn test
2730

2831
- name: Build
29-
run: yarn build
32+
run: |
33+
yarn clean
34+
yarn build
35+
yarn build:wrapper
3036
3137
- name: Integration Test
3238
uses: ./
3339
with:
34-
atmos_version: 1.12.2
40+
atmos-version: latest
41+
install-wrapper: true
42+
43+
- name: permissions
44+
run: |
45+
chmod 755 /home/runner/work/github-action-setup-atmos/atmos/atmos
46+
chmod 755 /home/runner/work/github-action-setup-atmos/atmos/atmos-bin
47+
cat -v /home/runner/work/github-action-setup-atmos/atmos/atmos
48+
49+
- name: atmos
50+
id: atmos
51+
run: atmos version
52+
53+
- name: Verify outputs are available
54+
run: |
55+
echo "stdout: ${{ steps.atmos.outputs.stdout }}"
56+
echo "stderr: ${{ steps.atmos.outputs.stderr }}"
57+
echo "exitcode: ${{ steps.atmos.outputs.exitcode }}"
3558
3659
- name: Commit and Push Changes
3760
uses: EndBug/add-and-commit@v9
3861
with:
39-
committer_name: GitHub Actions
62+
committer_name: GitHub Action
4063
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
4164
message: "chore: [skip-ci] format code and generate build artifacts"
42-
add: "."

.github/workflows/validate-codeowners.yml

+21-20
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@ jobs:
88
validate-codeowners:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: "Checkout source code at current commit"
12-
uses: actions/checkout@v2
13-
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved
14-
- uses: mszostok/[email protected]
15-
if: github.event.pull_request.head.repo.full_name == github.repository
16-
name: "Full check of CODEOWNERS"
17-
with:
18-
# For now, remove "files" check to allow CODEOWNERS to specify non-existent
19-
# files so we can use the same CODEOWNERS file for Terraform and non-Terraform repos
20-
# checks: "files,syntax,owners,duppatterns"
21-
checks: "syntax,owners,duppatterns"
22-
owner_checker_allow_unowned_patterns: "false"
23-
# GitHub access token is required only if the `owners` check is enabled
24-
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
25-
- uses: mszostok/[email protected]
26-
if: github.event.pull_request.head.repo.full_name != github.repository
27-
name: "Syntax check of CODEOWNERS"
28-
with:
29-
checks: "syntax,duppatterns"
30-
owner_checker_allow_unowned_patterns: "false"
11+
- name: "Checkout source code at current commit"
12+
uses: actions/checkout@v3
13+
14+
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved
15+
- uses: mszostok/[email protected]
16+
if: github.event.pull_request.head.repo.full_name == github.repository
17+
name: "Full check of CODEOWNERS"
18+
with:
19+
# For now, remove "files" check to allow CODEOWNERS to specify non-existent
20+
# files so we can use the same CODEOWNERS file for Terraform and non-Terraform repos
21+
# checks: "files,syntax,owners,duppatterns"
22+
checks: "syntax,owners,duppatterns"
23+
owner_checker_allow_unowned_patterns: "false"
24+
# GitHub access token is required only if the `owners` check is enabled
25+
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
26+
- uses: mszostok/[email protected]
27+
if: github.event.pull_request.head.repo.full_name != github.repository
28+
name: "Syntax check of CODEOWNERS"
29+
with:
30+
checks: "syntax,duppatterns"
31+
owner_checker_allow_unowned_patterns: "false"

.gitignore

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# Cloud Posse Build Harness
76+
.build-harness
77+
build-harness
78+
79+
# Mac DS_Store files
80+
.DS_Store

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docs/
2+
dist/
3+
node_modules/

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": false
3+
}

0 commit comments

Comments
 (0)