Update Forms Version #13683
This file contains hidden or 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 Forms Version | |
| on: | |
| schedule: | |
| # Run every 4 times a day | |
| - cron: '47 0,6,12,18 * * *' | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| update-forms-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.17 | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -v ./... | |
| - name: Setup git user/email | |
| run: | | |
| git config --global user.name github-actions | |
| git config --global user.email github-actions@github.com | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: ghpages | |
| path: ghpages | |
| - name: Update Forms Version | |
| run: | | |
| go run update-forms-ver.go > ghpages/v1/forms/standard-templates/latest | |
| mv Standard_Forms*.zip ghpages/v1/forms/standard-templates | |
| cd ghpages/v1/forms/standard-templates | |
| [ -z "$(git status -s -- .)" ] && echo "No changes to be committed. Exiting." && exit 0 | |
| echo "Commiting changes..." | |
| git add -- . | |
| git commit -m "Update form template version" | |
| git push origin ghpages | |
| echo "Done." |