add RunAfterTimeout & RunOnInterval (#75) #95
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: Update HTMGO Framework Dependency | |
on: | |
workflow_dispatch: # Trigger on manual workflow_dispatch | |
push: | |
branches: | |
- master # Trigger on pushes to master | |
paths: | |
- 'framework/**' | |
- 'tools/html-to-htmgo/**' | |
jobs: | |
update-htmgo-dep: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false # Necessary to avoid using the runner's credentials for commit | |
fetch-depth: 0 # Full history for committing back changes | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ">=1.20" | |
- name: Run update-htmgo-dep.go script | |
run: go run tools/update-htmgo-dep.go | |
- name: Commit changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Auto-update HTMGO framework version" | |
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |