Skip to content

Commit

Permalink
feat: enhance template sync workflow with ASDF caching and installati…
Browse files Browse the repository at this point in the history
…on steps
  • Loading branch information
jaygridley committed Jan 13, 2025
1 parent 46674dc commit 2d34495
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/template-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch:

permissions: {}

jobs:
universal-addon:
if: github.repository != 'lablabs/terraform-aws-eks-universal-addon'
Expand All @@ -22,7 +24,27 @@ jobs:
with:
token: ${{ steps.template-sync-app-token.outputs.token }}

- name: actions-template-sync
- name: Cache ASDF
uses: actions/cache@v4
id: asdf-cache
with:
path: ~/.asdf/
key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }}
restore-keys: ${{ runner.os }}-asdf-

- name: Setup ASDF
uses: asdf-vm/actions/setup@v3
if: ${{ steps.asdf-cache.outputs.cache-hit == 'true' }}

- name: Install ASDF
uses: asdf-vm/actions/install@v3
if: ${{ steps.asdf-cache.outputs.cache-hit != 'true' }}

- name: Reshim installed ASDF tools
shell: bash
run: asdf reshim

- name: Sync universal-addon template
uses: AndreasAugustin/actions-template-sync@v2
with:
github_token: ${{ steps.template-sync-app-token.outputs.token }}
Expand All @@ -33,4 +55,13 @@ jobs:
pr_title: "feat(sync): sync universal-addon changes"
pr_commit_msg: "feat(sync): sync universal-addon changes"
is_pr_cleanup: true
is_keep_branch_on_pr_cleanup: true

- name: Update README.md
run: |
pre-commit run terraform_docs --all-files || true
- name: Commit and push README.md
uses: EndBug/add-and-commit@v9
with:
add: README.md
message: "docs: update README.md"
2 changes: 1 addition & 1 deletion .templatesyncignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ examples/basic/main.tf
main.tf
addon-oidc.tf
variables.tf
variables-oidc.tf
variables-addon-oidc.tf
README.md
.secrets.baseline
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Terraform module to deploy the [aws-service-quotas-exporter](https://github.com/lablabs/aws-service-quotas-exporter) on Amazon EKS cluster.

[![Terraform validate](https://github.com/lablabs/terraform-aws-eks-aws-service-quotsa-exporter/actions/workflows/validate.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/validate.yaml)
[![Terraform validate](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/validate.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/validate.yaml)
[![pre-commit](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/pre-commit.yaml)

---
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* # AWS EKS AWS Service Quota Exporter Terraform module
*
* A Terraform module to deploy the [aws-service-quota-exporter](https://github.com/lablabs/aws-service-quotas-exporter) on Amazon EKS cluster.
* A Terraform module to deploy the [aws-service-quotas-exporter](https://github.com/lablabs/aws-service-quotas-exporter) on Amazon EKS cluster.
*
* [![Terraform validate](https://github.com/lablabs/terraform-aws-eks-aws-service-quota-exporter/actions/workflows/validate.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quota-exporter/actions/workflows/validate.yaml)
* [![pre-commit](https://github.com/lablabs/terraform-aws-eks-aws-service-quota-exporter/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quota-exporter/actions/workflows/pre-commit.yaml)
* [![Terraform validate](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/validate.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/validate.yaml)
* [![pre-commit](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-aws-service-quotas-exporter/actions/workflows/pre-commit.yaml)
*/
locals {
addon = {
Expand Down

0 comments on commit 2d34495

Please sign in to comment.