Fix issues with Nameservers (#258) #1046
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: Validate Pre-Commit | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Set up Go | |
# uses: actions/setup-go@v3 | |
# with: | |
# go-version-file: 'go.mod' | |
# check-latest: true | |
# cache: true | |
# - uses: robinraju/release-downloader@v1.7 | |
# with: | |
# repository: hashicorp/terraform-plugin-docs | |
# tag: "v0.13.0" | |
# fileName: "tfplugindocs_0.13.0_linux_amd64.zip" | |
# tarBall: false | |
# zipBall: false | |
# - name: Unzip | |
# run: | | |
# cd $GITHUB_WORKSPACE | |
# unzip -o tfplugindocs_0.13.0_linux_amd64.zip -d . | |
# - name: Validate Pre-Commit | |
# run: make ci-verify | |
rebuilddocs: | |
name: Generate docs | |
runs-on: ubuntu-latest | |
# needs: build | |
# if: failure() | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
cache: true | |
- uses: robinraju/release-downloader@v1.7 | |
with: | |
repository: hashicorp/terraform-plugin-docs | |
tag: "v0.13.0" | |
fileName: "tfplugindocs_0.13.0_linux_amd64.zip" | |
tarBall: false | |
zipBall: false | |
- name: Unzip | |
run: | | |
cd $GITHUB_WORKSPACE | |
unzip -o tfplugindocs_0.13.0_linux_amd64.zip -d . | |
- name: Run pre commit | |
run: | | |
make ci-pre-commit | |
git config --global user.name 'do87' | |
git config --global user.email 'do87@users.noreply.github.com' | |
git add docs/** | |
# Check if any files were added | |
if git diff --cached --name-only | grep -qE '.'; then | |
echo "Files added successfully." | |
else | |
echo "No files added. Exiting." | |
exit 0 | |
fi | |
git commit -m "Automated docs update" | |
git push || true |