Skip to content

Update Forms Version #34152

Update Forms Version

Update Forms Version #34152

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: 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: |
mkdir -p ghpages/v1/releases && go run keepalive.go get-latest-release.go > ghpages/v1/releases/latest
mkdir -p ghpages/v1/forms/standard-templates && go run keepalive.go 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
[ -z "$(git status -s)" ] && echo "No changes to be committed. Exiting." && exit 0
echo "Committing changes..."
git add -- .
git commit -m "Update form template version"
git push origin ghpages
echo "Done."