Skip to content

Update Forms Version #23600

Update Forms Version

Update Forms Version #23600

Workflow file for this run

name: Update Forms Version
on:
schedule:
# Run on the 17th minute (arbitrary) every hour
- cron: '17 * * * *'
push:
branches:
- main
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 [email protected]
- 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
rm -f ghpages/v1/forms/standard-templates/Standard_Forms*.zip
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."