Skip to content

Commit

Permalink
chore(template) update .github/workflows/readme.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Oct 28, 2020
1 parent 035b2b8 commit 3f2cd7e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,17 @@ jobs:
--wrap=preserve
docs/README.md
- name: commit changes
run: |
git config --local user.email "$(git log --format='%ae' HEAD^!)"
git config --local user.name "$(git log --format='%an' HEAD^!)"
git add README.md
git commit -m "docs(readme): update readme" || exit 0
git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
const { readFile } = require('fs/promises')
const content = await readFile(`${process.env.GITHUB_WORKSPACE}/README.md`)
await github.repos.createOrUpdateFileContents({
...context.repo,
path: 'README.md',
message: 'docs(readme): update readme',
content: content.toString('base64')
})

0 comments on commit 3f2cd7e

Please sign in to comment.