Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 29 additions & 18 deletions .github/workflows/validate-codeowners.yml
Original file line number Diff line number Diff line change
@@ -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`);
}
44 changes: 39 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a href="https://cpco.io/homepage"><img src="https://github.com/cloudposse/github-action-terraform-plan-storage/blob/main/.github/banner.png?raw=true" alt="Project Banner"/></a><br/>


<p align="right"><a href="https://github.com/cloudposse/github-action-terraform-plan-storage/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/github-action-terraform-plan-storage.svg?style=for-the-badge" alt="Latest Release"/></a><a href="https://github.com/cloudposse/github-action-terraform-plan-storage/commits"><img src="https://img.shields.io/github/last-commit/cloudposse/github-action-terraform-plan-storage.svg?style=for-the-badge" alt="Last Updated"/></a><a href="https://cloudposse.com/slack"><img src="https://slack.cloudposse.com/for-the-badge.svg" alt="Slack Community"/></a>
<p align="right"><a href="https://github.com/cloudposse/github-action-terraform-plan-storage/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/github-action-terraform-plan-storage.svg?style=for-the-badge" alt="Latest Release"/></a><a href="https://github.com/cloudposse/github-action-terraform-plan-storage/commits"><img src="https://img.shields.io/github/last-commit/cloudposse/github-action-terraform-plan-storage.svg?style=for-the-badge" alt="Last Updated"/></a><a href="https://cloudposse.com/slack"><img src="https://slack.cloudposse.com/for-the-badge.svg" alt="Slack Community"/></a><a href="https://cloudposse.com/support/"><img src="https://img.shields.io/badge/Get_Support-success.svg?style=for-the-badge" alt="Get Support"/></a>

</p>
<!-- markdownlint-restore -->
Expand All @@ -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.)
**
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -186,6 +193,32 @@ The `component`, `stack`, `planPath`, and `action` parameters work the same way



<!-- markdownlint-disable -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

No modules.

## Resources

No resources.

## Inputs

No inputs.

## Outputs

No outputs.
<!-- markdownlint-restore -->




Expand Down Expand Up @@ -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.
>
> <a href="https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-action-terraform-plan-storage&utm_content=commercial_support"><img alt="Request Quote" src="https://img.shields.io/badge/request%20quote-success.svg?style=for-the-badge"/></a>
> </details>
>
</details>

## ✨ Contributing

Expand Down Expand Up @@ -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)



Expand Down
7 changes: 7 additions & 0 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading