Skip to content

Commit e266720

Browse files
Fix/workflow versions (#24)
* Update workflow versions * Add fixed workflow for pre-commit
1 parent 5a67092 commit e266720

File tree

6 files changed

+68
-19
lines changed

6 files changed

+68
-19
lines changed

.github/workflows/pull-request-ephemeral-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
get-tg-versions:
1010
permissions:
1111
contents: read
12-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.1.7
12+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.2.0
1313

1414
build-matrix:
1515
permissions:
1616
contents: read
17-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.1.7
17+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.2.0
1818
with:
1919
platform_environment: sandbox
2020

@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
2929

30-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-deploy-ephemeral.yml@feature/tg-deploy-without-gh-environment
30+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-deploy-ephemeral.yml@0.2.0
3131
with:
3232
git_branch: ${{ github.head_ref }}
3333
assume_role_arn: "arn:aws:iam::020127659860:role/github-actions-deploy-role"

.github/workflows/pull-request-ephemeral-destroy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Sandbox Environment
1+
name: Destroy Ephemeral Sandbox Environment
22

33
on:
44
pull_request:
@@ -9,12 +9,12 @@ jobs:
99
get-tg-versions:
1010
permissions:
1111
contents: read
12-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.1.7
12+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.2.0
1313

1414
build-matrix:
1515
permissions:
1616
contents: read
17-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.1.7
17+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.2.0
1818
with:
1919
platform_environment: sandbox
2020

@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
2929

30-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-destroy-ephemeral.yml@feature/tg-deploy-without-gh-environment
30+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-destroy-ephemeral.yml@0.2.0
3131
with:
3232
git_branch: ${{ github.head_ref }}
3333
assume_role_arn: "arn:aws:iam::020127659860:role/github-actions-deploy-role"

.github/workflows/python-tests.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3-
41
name: Python Tests
52

63
on:
7-
push:
8-
branches-ignore: [ "main" ]
94
pull_request:
105
branches: [ "**" ]
116

@@ -15,7 +10,20 @@ permissions:
1510
pull-requests: write
1611

1712
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
17+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
18+
with:
19+
python-version: '3.13'
20+
- uses: launchbynttdata/actions-asdf-install_tools@v0.2.0
21+
with:
22+
exclude_tools: "python"
23+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
24+
1825
run-tests:
26+
needs: [ pre-commit ]
1927
runs-on: ubuntu-latest
2028
strategy:
2129
matrix:
@@ -29,9 +37,6 @@ jobs:
2937
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1
3038
with:
3139
python-version: ${{ matrix.python-version }}
32-
- name: Ruff check
33-
run: |
34-
uvx ruff check
3540
- name: Install dependencies
3641
run: |
3742
uv sync

.github/workflows/release-published.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
get-tg-versions:
1010
permissions:
1111
contents: read
12-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.1.7
12+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-versions.yml@0.2.0
1313

1414
build-matrix:
1515
permissions:
1616
contents: read
17-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.1.7
17+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-github-matrix-tg.yml@0.2.0
1818
with:
1919
platform_environment: production
2020

@@ -27,8 +27,9 @@ jobs:
2727
fail-fast: false
2828
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
2929

30-
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-deploy.yml@0.1.7
30+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-terragrunt-deploy.yml@0.2.0
3131
with:
32+
git_branch: ${{ github.head_ref }}
3233
tf_version: ${{ needs.get-tg-versions.outputs.tf_version }}
3334
tg_version: ${{ needs.get-tg-versions.outputs.tg_version }}
3435
environment: ${{ matrix.terragrunt_environment.environment }}

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/uv-pre-commit
3+
rev: ac44eab0cf35cf4268a18f1e7c20e0980550d6fa # 0.7.15
4+
hooks:
5+
- id: uv-lock
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # v5.0.0
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: check-case-conflict
11+
- id: check-executables-have-shebangs
12+
- id: check-json
13+
- id: check-merge-conflict
14+
- id: check-shebang-scripts-are-executable
15+
- id: check-yaml
16+
args:
17+
- --allow-multiple-documents
18+
- id: end-of-file-fixer
19+
- id: mixed-line-ending
20+
args:
21+
- --fix=auto
22+
- repo: https://github.com/astral-sh/ruff-pre-commit
23+
rev: 8a948e557ca98afa9489998ad0b85515964df9c4 # v0.12.0
24+
hooks:
25+
- id: ruff-check
26+
types_or: [python, pyi]
27+
args: [--fix]
28+
- id: ruff-format
29+
types_or: [python, pyi]
30+
- repo: https://github.com/RobertCraigie/pyright-python
31+
rev: 708a9d4a964376a7be931b7721d315ef1d2db31d # v1.1.402
32+
hooks:
33+
- id: pyright
34+
- repo: https://github.com/antonbabenko/pre-commit-terraform
35+
rev: 2f8bda194a420ad77a050a9de627d77a74841fdc # v1.99.4
36+
hooks:
37+
- id: terragrunt_fmt
38+
- id: terragrunt_validate_inputs
39+
exclude: "^[^/]+$"
40+
args:
41+
- --env-vars=TF_VAR_organization_tag="THIS_ORGANIZATION"
42+
- --env-vars=TF_VAR_repository_tag="THIS_REPOSITORY"
43+
- --env-vars=TF_VAR_commit_hash_tag="THIS_COMMIT_HASH"

terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
locals {
33
# After initial apply, changes to these naming values will result in the creation of new state bucket(s) and dynamodb table(s)!
4-
logical_product_family = "sample"
4+
logical_product_family = "sample"
55
logical_product_service = "lambda"
66

77
# Don't modify the locals below this line.

0 commit comments

Comments
 (0)