updateReadMe #74341
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: updateReadMe | |
on: | |
workflow_run: | |
workflows: [schedule] | |
types: | |
- completed | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.18 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
id: go | |
- name: Run update | |
env: | |
barkToken: ${{secrets.BARK_TOKEN}} | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "Github Action" | |
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git pull --rebase | |
go build update.go utils.go | |
./update | |
rm update | |
git add . | |
git commit -m "Auto Update `date --rfc-3339=seconds`" | |
git push -f |