{"id":19268399,"url":"https://github.com/pluralith/actions","last_synced_at":"2025-07-03T19:37:36.762Z","repository":{"id":38192818,"uuid":"468285658","full_name":"Pluralith/actions","owner":"Pluralith","description":"A collection of GitHub Actions to run Pluralith in CI and automate infrastructure documentation generation","archived":false,"fork":false,"pushed_at":"2023-02-28T09:05:03.000Z","size":387,"stargazers_count":26,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T15:50:07.397Z","etag":null,"topics":["cicd","github-actions","pluralith","terraform"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pluralith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-10T09:59:52.000Z","updated_at":"2025-02-25T05:56:12.000Z","dependencies_parsed_at":"2023-01-04T12:15:54.147Z","dependency_job_id":null,"html_url":"https://github.com/Pluralith/actions","commit_stats":{"total_commits":49,"total_committers":1,"mean_commits":49.0,"dds":0.0,"last_synced_commit":"7f562c43f337f0065c827b27d0ba88f4f5a0775d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluralith%2Factions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluralith%2Factions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluralith%2Factions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluralith%2Factions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pluralith","download_url":"https://codeload.github.com/Pluralith/actions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250120212,"owners_count":21378154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","github-actions","pluralith","terraform"],"created_at":"2024-11-09T20:16:09.936Z","updated_at":"2025-04-21T19:33:23.041Z","avatar_url":"https://github.com/Pluralith.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Badge Blue](https://user-images.githubusercontent.com/25454503/158019834-99b2365e-94c4-4139-80ef-3e0b7bf354f0.svg)\n\n# Pluralith GitHub Actions\n\nThis repo contains a collection of Github Actions to run Pluralith in CI and post infrastructure diagrams as pull request or commit comments.\nIt currently contains three actions, we recommend running them in conjunction:\n\n1. **Init** - `Pluralith/actions/init`\n2. **Run** - `Pluralith/actions/run`\n3. **Comment** - `Pluralith/actions/comment`\n\n\u0026nbsp;\n\n### 📍 The result looks like this:\n\n![Actions Comment](https://user-images.githubusercontent.com/25454503/202181204-42c768ad-4a45-45dc-b391-65c231f52991.png)\n\n\u0026nbsp;\n\n## ⚙️ Getting Started\n\nFollow these steps to get Pluralith running in your GitHub Actions workflow:\n\n1. Create a new Pluralith workflow file in your repo at `.github/workflows/pluralith.yml` _(View the full example at the bottom of this README to see how to structure a workflow YML file)_\n2. Set `PLURALITH_API_KEY` as a [repository secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository). You can get your API Key through the Pluralith Dashboard.\n3. Ensure Pluralith is properly configured. There are multiple options to do this:\n\n    - Commit a valid [Pluralith Config File](https://docs.pluralith.com/docs/more/config) (pluralith.yml) to your repo\n    - Set `PLURALITH_ORG_ID`, `PLURALITH_PROJECT_ID` and `PLURALITH_PROJECT_NAME` as [environment variables](https://docs.github.com/en/actions/learn-github-actions/environment-variables) in your workflow.\n    - Pass `org_id`, `project_id` and `project_name` directly as parameters to the **Pluralith Init** step.\n\n4. Set credentials for the providers of your choice as repository secrets _(e.g. for AWS set `AWS_ACCESS_KEY` and `AWS_SECRET_KEY`)_.\n5. Set up Terraform and run `terraform init`. Hashicorp's `hashicorp/setup-terraform` action makes this a breeze. Check it out [here](https://github.com/hashicorp/setup-terraform) or copy the example below into your steps:\n\n```yml\n# Set up Terraform\n- name: Setup Terraform\n  uses: hashicorp/setup-terraform@v1\n  with:\n    terraform_wrapper: false # This is recommended so the `terraform show` command outputs valid JSON\n\n# Init Terraform project\n- name: Terraform Init\n  run: terraform init\n  working-directory: path/to/terraform/root\n```\n\n6. Set up and run Pluralith. Copy and paste the following three steps into your worflow:\n\n```yml\n# Set up and initialize Pluralith\n- name: Pluralith Init\n  uses: Pluralith/actions/init@v1.4.0\n  with:\n    terraform-path: \"${{ env.working-directory }}/application\"\n    api-key: ${{ secrets.PLURALITH_API_KEY }}\n\n# Run Pluralith to generate an infrastructure diagram and comment body\n- name: Pluralith Run\n  uses: Pluralith/actions/run@v1.4.0\n  with:\n    terraform-command: \"plan\"\n    terraform-path: \"${{ env.working-directory }}/application\"\n    show-changes: true\n    show-drift: true\n    show-costs: true # Requires Infracost to be set up in your pipeline\n\n# Post the generated diagram as a GitHub comment\n- name: Pluralith Comment\n  uses: Pluralith/actions/comment@v1.4.0\n  with:\n    terraform-path: \"${{ env.working-directory }}/application\"\n```\n\n7. That's it! Create a pull request and see the magic happen in its comments!\n   \u0026nbsp;\n\n## 🛰️ Action Overview\n\nClick the links below or navigate the repository above to learn more about the individual GitHub Actions for Pluralith:\n\n- **[Pluralith Init](https://github.com/Pluralith/actions/tree/main/init)** - Sets up and authenticates Pluralith\n- **[Pluralith Run](https://github.com/Pluralith/actions/tree/main/run)** - Runs `pluralith graph` to produce an infrastructure diagram as a PDF\n- **[Pluralith Comment](https://github.com/Pluralith/actions/tree/main/comment)** - Posts the infrastructure diagram created in `Pluralith Run` as a GitHub comment to a pull request or commit\n\n\u0026nbsp;\n\n## 📦 Full AWS Example\n\nIf you are running AWS you can copy and paste the following into your `.github/workflows/pluralith.yml`. Adjust the paths to fit your Terraform project structure and you should be ready to go!\n\n`This example assumes a valid **pluralith.yml** config file in your Terraform project's root directory` \n\n```yml\non: [pull_request]\njobs:\n  pluralith:\n    runs-on: ubuntu-latest\n    env:\n      working-directory: terraform\n\n    name: Run Pluralith\n    steps:\n      - name: Check out repository\n        uses: actions/checkout@v2\n\n      # Set up AWS credentials (using the aws-actions/configure-aws-credentials action)\n      - name: Configure AWS Credentials\n        uses: aws-actions/configure-aws-credentials@v1\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}\n          aws-region: eu-central-1\n\n      # Set up Terraform\n      - name: Setup Terraform\n        uses: hashicorp/setup-terraform@v1\n        with:\n          terraform_wrapper: false # This is recommended so the `terraform show` command outputs valid JSON\n\n      # Init Terraform project\n      - name: Terraform Init\n        run: terraform init\n        working-directory: \"${{ env.working-directory }}/application\"\n\n      # Set up and authenticate Pluralith\n      - name: Pluralith Init\n        uses: Pluralith/actions/init@v1.4.0\n        with:\n          terraform-path: \"${{ env.working-directory }}/application\"\n          api-key: ${{ secrets.PLURALITH_API_KEY }}\n\n      # Run Pluralith to generate an infrastructure diagram and comment body\n      - name: Pluralith Run\n        uses: Pluralith/actions/run@v1.4.0\n        with:\n          terraform-command: \"plan\"\n          terraform-path: \"${{ env.working-directory }}/application\"\n          show-changes: true\n          show-drift: true\n          show-costs: true # Requires Infracost to be set up in your pipeline\n\n      # Post the generated diagram as a GitHub comment\n      - name: Pluralith Comment\n        uses: Pluralith/actions/comment@v1.4.0\n        with:\n          terraform-path: \"${{ env.working-directory }}/application\"\n```\n\n\u0026nbsp;\n\n## 👩‍🚀 Looking to become a tester or talk about the project?\n\n- Sign up for the `alpha` over on our **[Website](https://www.pluralith.com)**\n- Join our **[Subreddit](https://www.reddit.com/r/Pluralith/)**\n- Check out our **[Roadmap](https://roadmap.pluralith.com)** and upvote features you'd like to see\n- Or just shoot us a message on Linkedin:\n  - [Dan's Linkedin](https://www.linkedin.com/in/danielputzer/)\n  - [Phi's Linkedin](https://www.linkedin.com/in/philipp-weber-a8517b231/)\n\n_Disclaimer: To properly use any of the Pluralith Actions you **will need an API key**. [Sign up](https://www.pluralith.com) for the private alpha to get access!_\n\n![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/pluralith?style=social)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluralith%2Factions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpluralith%2Factions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluralith%2Factions/lists"}