CDKTF Documentation #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CDKTF Documentation | |
on: | |
schedule: | |
- cron: "0 0 * * WED" | |
workflow_dispatch: {} | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
cdktfDocs: | |
runs-on: | |
- custom | |
- linux | |
- custom-linux-medium | |
container: | |
image: docker.mirror.hashicorp.services/hashicorp/jsii-terraform | |
env: | |
CHECKPOINT_DISABLE: "1" | |
timeout-minutes: 120 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- run: git config --global user.email "github-team-tf-cdk@hashicorp.com" | |
- run: git config --global user.name "team-tf-cdk" | |
- name: Get yarn cache directory path | |
id: global-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
id: global-cache | |
with: | |
path: ${{ steps.global-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-integration-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Setup Node.js | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: "18.x" | |
- name: Install cdktf-registry-docs | |
run: npm install -g cdktf-registry-docs@1.12.0 | |
- name: Run conversion | |
run: | | |
cdktf-registry-docs convert \ | |
--files='*/ec2_*.html.markdown' \ | |
--languages='typescript,python' \ | |
--parallel-file-conversions=1 \ | |
--provider-from-registry="hashicorp/aws" \ | |
. | |
env: | |
TF_PLUGIN_CACHE_DIR: ${{ steps.global-cache-dir-path.outputs.dir }}/terraform-plugins | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 | |
with: | |
commit-message: "docs: update cdktf documentation" | |
title: "docs: update cdktf documentation" | |
body: "This PR updates the cdktf related documentation based on the current HCL-based documentation. It is automatically created by the cdktf-documentation GitHub action." | |
token: ${{ secrets.ORGSCOPED_GITHUB_TOKEN }} |