fix: set log retention in each module by default to 180 (#3433) #10
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: Update docs | |
on: | |
push: | |
paths: | |
- "*.tf" | |
- "*.md" | |
- ".github/workflows/update-docs.yml" | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
docs: | |
# update docs after merge back to develop | |
name: Auto update terraform docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get installation token | |
uses: philips-software/app-token-action@a37926571e4cec6f219e06727136efdd073d8657 # ratchet:philips-software/[email protected] | |
id: token | |
with: | |
app_id: ${{ secrets.FOREST_RELEASER_APP_ID }} | |
app_base64_private_key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY_BASE64 }} | |
auth_type: installation | |
# We use the app for branches in this this repo to ensure PR chekcs are kept in place. | |
- if: github.event_name == 'push' && github.repository_owner == 'philips-labs' && github.ref != 'refs/heads/main' | |
name: Checkout with App Token | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # ratchet:actions/checkout@v3 | |
with: | |
token: ${{ steps.token.outputs.token }} | |
- if: (github.event_name == 'push' && github.repository_owner != 'philips-labs') || github.ref == 'refs/heads/main' | |
name: Checkout with GITHUB Action token | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # ratchet:actions/checkout@v3 | |
- name: Generate TF docs | |
uses: terraform-docs/gh-actions@f6d59f89a280fa0a3febf55ef68f146784b20ba0 # ratchet:terraform-docs/[email protected] | |
with: | |
find-dir: . | |
git-commit-message: "docs: auto update terraform docs" | |
git-push: ${{ github.ref != 'refs/heads/main' }} | |
- name: Create Pull Request (main branch only) | |
if: github.ref == 'refs/heads/main' | |
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # ratchet:peter-evans/[email protected] | |
with: | |
token: ${{ steps.token.outputs.token || secrets.GITHUB_TOKEN }} | |
commit-message: "Update Terraform docs" | |
title: "docs: Update Terraform docs" | |
branch: ${{ github.event.pull_request.base.ref }}-update-docs | |
base: ${{ github.event.pull_request.base.ref }} |