From 74f7f5a8d491a762a82a859bbc392bfe42be58e9 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 25 Aug 2022 17:52:50 +0200 Subject: [PATCH 1/6] feat(ci): add actionlint in pre-commit hook --- .github/workflows/reusable_export_pr_details.yml | 3 +++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/reusable_export_pr_details.yml b/.github/workflows/reusable_export_pr_details.yml index 86c3e7d645e..ec168b95f20 100644 --- a/.github/workflows/reusable_export_pr_details.yml +++ b/.github/workflows/reusable_export_pr_details.yml @@ -4,13 +4,16 @@ on: workflow_call: inputs: record_pr_workflow_id: + description: "Record PR workflow execution ID to download PR details" required: true type: number workflow_origin: # see https://github.com/awslabs/aws-lambda-powertools-python/issues/1349 + description: "Repository full name for runner integrity" required: true type: string secrets: token: + description: "GitHub Actions temporary and scoped token" required: true # Map the workflow outputs to job outputs outputs: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a41e0d945c..486caaeca4b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,3 +39,8 @@ repos: hooks: - id: cfn-python-lint files: examples/.*\.(yaml|yml)$ + - repo: https://github.com/rhysd/actionlint + rev: v1.6.16 + hooks: + - id: actionlint + args: [-pyflakes=] From 16d117b362312d40da9869c5ab480ef91f350ad6 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 25 Aug 2022 17:54:13 +0200 Subject: [PATCH 2/6] chore(ci): remove unused and undeclared OS matrix env --- .github/workflows/python_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index 901c593ebce..e7a9b1273a5 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -28,7 +28,6 @@ jobs: matrix: python-version: [3.7, 3.8, 3.9] env: - OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 @@ -56,6 +55,6 @@ jobs: with: file: ./coverage.xml # flags: unittests - env_vars: OS,PYTHON + env_vars: PYTHON name: aws-lambda-powertools-python-codecov # fail_ci_if_error: true # failing more consistently making CI unreliable despite all tests above passing From 27c5b746f827d152c4266c777a316bb6760db7ec Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 25 Aug 2022 17:56:34 +0200 Subject: [PATCH 3/6] chore(ci): add missing description fields --- .github/workflows/reusable_deploy_layer_stack.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/reusable_deploy_layer_stack.yml b/.github/workflows/reusable_deploy_layer_stack.yml index e1190e19873..20d69b9c814 100644 --- a/.github/workflows/reusable_deploy_layer_stack.yml +++ b/.github/workflows/reusable_deploy_layer_stack.yml @@ -8,12 +8,15 @@ on: workflow_call: inputs: stage: + description: "Deployment stage (BETA, PROD)" required: true type: string artefact-name: + description: "CDK Layer Artefact name to download" required: true type: string environment: + description: "GitHub Environment to use for encrypted secrets" required: true type: string From fbecbf155ffe628e7fecd30dc2a7595cc6cff64d Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 25 Aug 2022 17:58:19 +0200 Subject: [PATCH 4/6] chore(ci): fix invalid dependency leftover --- .github/workflows/build_changelog.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_changelog.yml b/.github/workflows/build_changelog.yml index f0501083048..3cd6fffe855 100644 --- a/.github/workflows/build_changelog.yml +++ b/.github/workflows/build_changelog.yml @@ -6,5 +6,4 @@ on: jobs: changelog: - needs: release uses: ./.github/workflows/reusable_publish_changelog.yml From b71f33e75c07af8afb978536404d550f30e011d4 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 25 Aug 2022 17:59:06 +0200 Subject: [PATCH 5/6] chore(ci): remove dangling debug step --- .github/workflows/on_opened_pr.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/on_opened_pr.yml b/.github/workflows/on_opened_pr.yml index 2663d605325..6c5979c8b80 100644 --- a/.github/workflows/on_opened_pr.yml +++ b/.github/workflows/on_opened_pr.yml @@ -20,8 +20,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: "Debug workflow_run event" - run: echo "${{ github }}" - name: "Ensure related issue is present" uses: actions/github-script@v6 env: From ca5299b45f9be044fd397adffb9193ad6998bed8 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Thu, 25 Aug 2022 19:14:37 +0200 Subject: [PATCH 6/6] fix(ci): use actionlint docker hook --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 486caaeca4b..71b1125cf54 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,5 +42,5 @@ repos: - repo: https://github.com/rhysd/actionlint rev: v1.6.16 hooks: - - id: actionlint + - id: actionlint-docker args: [-pyflakes=]