File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Update Version on File Change
2+ on :
3+ push :
4+ paths :
5+ - ' Pagetual/items_all.json'
6+ - ' Pagetual/pagetualRules.json'
7+
8+ jobs :
9+ update_version :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v2
14+
15+ - name : Read current version
16+ id : read_version
17+ run : echo "::set-output name=version::$(cat Pagetual/version)"
18+
19+ - name : Increment version
20+ id : increment_version
21+ run : echo "::set-output name=version::$((${{ steps.read_version.outputs.version }} + 1))"
22+
23+ - name : Update version file
24+ run : echo "${{ steps.increment_version.outputs.version }}" > Pagetual/version
25+
26+ - name : Commit version update
27+ run : |
28+ git config --local user.email "rixixi@gmail.com"
29+ git config --local user.name "hoothin-update"
30+ git add Pagetual/version
31+ git commit -m "Update version of Pagetual rules to ${{ steps.increment_version.outputs.version }}"
32+ git push https://${{ secrets.ACTION_SECRET }}@github.com/${{ github.repository }}
Original file line number Diff line number Diff line change 1+ 0
You can’t perform that action at this time.
0 commit comments