chore(deps): update actions/setup-go action to v6 #30
This file contains hidden or 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 Readme | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| embed-code: | |
| name: Embed code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Convert tabs to spaces for README.md embedding | |
| run: find examples -type f -name "*.go" -exec sed -i 's/\t/ /g' {} + | |
| - name: Run embed-code-in-markdown.pl | |
| run: | | |
| ./.github/workflows/embed-code-in-markdown.pl README.md | |
| git add README.md | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | |
| if git commit -m "Embedding code in README.md"; then | |
| branchName=${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} | |
| git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git "$branchName" | |
| fi |