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: first | |
# on: | |
# pull_request: | |
# paths-ignore: | |
# - ".github/workflows/release.yml" | |
# jobs: | |
# job1: | |
# name: Pull Request | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# with: | |
# ref: ${{ github.event.pull_request.head.ref }} | |
# - name: Check tfdocs-config existence | |
# uses: andstor/file-existence-action@v1 | |
# id: tfdocs_config | |
# with: | |
# files: ".tfdocs-config.yml" | |
# - name: set tfdocs config | |
# shell: bash | |
# if: steps.tfdocs_config.outputs.files_exists == 'true' | |
# run: echo "tfdocs_config=.tfdocs-config.yml" >> $GITHUB_ENV | |
# - name: Set tfdocs git push parameter | |
# id : set_tfdocs_git_push | |
# shell: bash | |
# if: github.ref != 'refs/heads/master' || github.ref != 'refs/heads/main' | |
# run: echo '::set-output name=git_push::true' | |
# - name: Render terraform docs inside the README.md and push changes back to PR branch | |
# uses: terraform-docs/gh-actions@v0.8.0 | |
# with: | |
# working-dir: . | |
# output-file: README.md | |
# output-method: inject | |
# git-push: "${{ steps.set_tfdocs_git_push.outputs.git_push }}" | |
# fail-on-diff: "true" | |
# git-commit-message: "[skip ci] terraform-docs: automated action" | |
# config-file: "${{ env.tfdocs_config }}" |