-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Evy Bongers
authored
Nov 11, 2021
1 parent
b287e0b
commit ce938af
Showing
10 changed files
with
1,886 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"commonjs": true, | ||
"es2021": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"max-len": "off", | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
code-style: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set Node.js version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install dependencies | ||
run: npm clean-install | ||
|
||
- name: Run code style test | ||
run: npm run lint | ||
|
||
check-dist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set Node.js version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install dependencies | ||
run: npm clean-install | ||
|
||
- name: Rebuild the dist/ directory | ||
run: npm run build | ||
|
||
- name: Compare the expected and actual dist/ directories | ||
run: | | ||
git diff --quiet --ignore-space-at-eol dist/ && exit 0 | ||
echo "Detected uncommitted changes after build. See status below:" | ||
git diff --exit-code dist/ | ||
id: diff | ||
|
||
# If index.js was different than expected, upload the expected version as an artifact | ||
#- uses: actions/upload-artifact@v2 | ||
# if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
# with: | ||
# name: dist | ||
# path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM node:16 | ||
COPY dist dist | ||
ENTRYPOINT [ "node", "/dist/index.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Terraform | ||
|
||
[GitHub Action](https://github.com/features/actions) to automate Terraform workflows. | ||
|
||
## Usage | ||
|
||
```yaml | ||
- uses: Pararius/action-terraform@0.0.9 | ||
name: Terraform | ||
with: | ||
# Google credentials, required for accessing state bucket | ||
google_credentials: '' | ||
|
||
# Location of terraform manifests, relative to the current working directory | ||
# Default: ./ | ||
terraform_directory: '' | ||
|
||
# Whether to run `terraform apply` as last step | ||
# Default: 'false' | ||
terraform_do_apply: '' | ||
|
||
# Whether to (try to) lock the state during plan/apply. Reccommended when | ||
# terraform_do_apply is set to 'true' | ||
# Default: 'false' | ||
terraform_lock: '' | ||
|
||
# Limit the number of concurrent operations during plan/apply | ||
# Default: '10' | ||
terraform_parallelism: '' | ||
``` | ||
## Example | ||
### Only run terraform plan, without locking the workspace | ||
```yaml | ||
- uses: Pararius/action-terraform@0.0.9 | ||
name: Terraform | ||
with: | ||
google_credentials: ${{ secrets.YOUR_SECRET }} | ||
terraform_directory: ./terraform/ | ||
terraform_do_apply: false | ||
``` | ||
### Also run terraform apply, locking the workspace | ||
```yaml | ||
- uses: Pararius/action-terraform@0.0.9 | ||
name: Terraform | ||
with: | ||
google_credentials: ${{ secrets.YOUR_SECRET }} | ||
terraform_directory: ./terraform/ | ||
terraform_do_apply: true | ||
terraform_lock: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.