-
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
1 parent
175cb9b
commit da74f92
Showing
6 changed files
with
80 additions
and
77 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 |
---|---|---|
@@ -1,19 +1,43 @@ | ||
name: Pre-commit Check | ||
name: Deploy Dev Infrastructure | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
pre-commit: | ||
tf_fmt: | ||
name: Deploy Dev App | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- name: Run image | ||
uses: abatilo/actions-poetry@v2 | ||
- uses: pre-commit/action@v3.0.1 | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Terraform Init | ||
uses: hashicorp/terraform-github-actions/init@v0.4.0 | ||
with: | ||
tf_actions_working_dir: 'terraform' | ||
args: '-var-file="environments/dev.tfvars"' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TF_ACTION_WORKING_DIR: 'terraform' | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
- name: Terraform Validate | ||
uses: hashicorp/terraform-github-actions/validate@v0.3.7 | ||
with: | ||
tf_actions_working_dir: 'terraform' | ||
args: '-var-file="environments/dev.tfvars"' | ||
|
||
- name: Terraform Apply | ||
uses: hashicorp/terraform-github-actions/apply@v0.4.0 | ||
with: | ||
tf_actions_working_dir: 'terraform' | ||
args: '-var-file="environments/dev.tfvars"' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TF_ACTION_WORKING_DIR: 'terraform' | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Pre-commit Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- name: Run image | ||
uses: abatilo/actions-poetry@v2 | ||
- uses: pre-commit/action@v3.0.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: double-quote-string-fixer | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v2.5.0 | ||
hooks: | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/asottile/reorder-python-imports | ||
rev: v3.12.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/) | ||
args: [--py39-plus, --add-import, 'from __future__ import annotations'] | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py39-plus] | ||
- repo: https://github.com/hhatto/autopep8 | ||
rev: v2.0.4 | ||
hooks: | ||
- id: autopep8 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-all] | ||
exclude: ^testing/resources/ | ||
- id: validate_manifest | ||
name: validate pre-commit manifest | ||
description: This validator validates a pre-commit hooks manifest file | ||
entry: pre-commit validate-manifest | ||
language: python | ||
files: ^\.pre-commit-hooks\.yaml$ |