diff --git a/.github/workflows/validate-codeowners.yml b/.github/workflows/validate-codeowners.yml index e7a8159d..d3d0b280 100644 --- a/.github/workflows/validate-codeowners.yml +++ b/.github/workflows/validate-codeowners.yml @@ -1,30 +1,41 @@ name: Validate Codeowners on: workflow_dispatch: - pull_request: +permissions: + contents: read + jobs: validate-codeowners: runs-on: ubuntu-latest steps: - - name: "Checkout source code at current commit" - uses: actions/checkout@v2 - # Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved - - uses: mszostok/codeowners-validator@v0.7.1 - if: github.event.pull_request.head.repo.full_name == github.repository - name: "Full check of CODEOWNERS" - with: - # For now, remove "files" check to allow CODEOWNERS to specify non-existent - # files so we can use the same CODEOWNERS file for Terraform and non-Terraform repos - # checks: "files,syntax,owners,duppatterns" - checks: "syntax,owners,duppatterns" - owner_checker_allow_unowned_patterns: "false" - # GitHub access token is required only if the `owners` check is enabled - github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}" - - uses: mszostok/codeowners-validator@v0.7.1 - if: github.event.pull_request.head.repo.full_name != github.repository - name: "Syntax check of CODEOWNERS" + - name: Checkout source code at current commit + uses: actions/checkout@v4 + + - name: Check CODEOWNERS syntax and duplicate patterns + uses: mszostok/codeowners-validator@v0.7.1 with: checks: "syntax,duppatterns" owner_checker_allow_unowned_patterns: "false" + + - name: Check owners with GitHub's CODEOWNERS validation + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + // GitHub resolves team membership and repository access server-side, + // so validation only needs the workflow's read-only repository token. + const { data } = await github.rest.repos.codeownersErrors({ + ...context.repo, + ref: context.sha, + }); + for (const error of data.errors) { + core.error(error.message, { + file: error.path, + startLine: error.line, + startColumn: error.column, + }); + } + if (data.errors.length > 0) { + core.setFailed(`Found ${data.errors.length} CODEOWNERS errors`); + } diff --git a/README.md b/README.md index b536101b..6f695d53 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Project Banner
-

Latest ReleaseLast UpdatedSlack Community +

Latest ReleaseLast UpdatedSlack CommunityGet Support

@@ -18,8 +18,8 @@ ** ** This file was automatically generated by the `cloudposse/build-harness`. ** 1) Make all changes to `README.yaml` - ** 2) Run `make init` (you only need to do this once) - ** 3) Run`make readme` to rebuild this file. + ** 2) Install [atmos](https://atmos.tools/install/) (you only need to do this once) + ** 3) Run`atmos readme` to rebuild this file. ** ** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.) ** @@ -47,6 +47,13 @@ A GitHub Action to securely store Terraform plan files in a cloud storage (S3 or ## Introduction +> [!WARNING] +> **Deprecated.** Migrate to Atmos's [built-in planfile storage](https://atmos.tools/ci/planfile-storage). + +This action is deprecated in favor of Atmos Native CI. See the migration guide at +https://atmos.tools/deprecated/github-actions/terraform-plan-storage for the equivalent built-in +planfile storage and how to move your workflow over. + A Github Action to securely store Terraform plan files in a cloud storage (S3 or Azure Blob Storage) with metadata storage in cloud document database (DynamoDB or CosmosDB). This is useful in CI/CD pipelines where you want to store the plan files when a feature branch is opened and applied when merged. @@ -186,6 +193,32 @@ The `component`, `stack`, `planPath`, and `action` parameters work the same way + +## Requirements + +No requirements. + +## Providers + +No providers. + +## Modules + +No modules. + +## Resources + +No resources. + +## Inputs + +No inputs. + +## Outputs + +No outputs. + + @@ -247,7 +280,8 @@ For additional context, refer to some of these links. > - **Customer Workshops.** Engage with our team in weekly workshops, gaining insights and strategies to continuously improve and innovate. > > Request Quote -> +> + ## ✨ Contributing @@ -324,7 +358,7 @@ All other trademarks referenced herein are the property of their respective owne ## Copyrights -Copyright © 2023-2025 [Cloud Posse, LLC](https://cloudposse.com) +Copyright © 2023-2026 [Cloud Posse, LLC](https://cloudposse.com) diff --git a/README.yaml b/README.yaml index 0d50d880..6e9c0b05 100644 --- a/README.yaml +++ b/README.yaml @@ -34,6 +34,13 @@ description: |- # Introduction to the project introduction: |- + > [!WARNING] + > **Deprecated.** Migrate to Atmos's [built-in planfile storage](https://atmos.tools/ci/planfile-storage). + + This action is deprecated in favor of Atmos Native CI. See the migration guide at + https://atmos.tools/deprecated/github-actions/terraform-plan-storage for the equivalent built-in + planfile storage and how to move your workflow over. + A Github Action to securely store Terraform plan files in a cloud storage (S3 or Azure Blob Storage) with metadata storage in cloud document database (DynamoDB or CosmosDB). This is useful in CI/CD pipelines where you want to store the plan files when a feature branch is opened and applied when merged.