Skip to content

Bump tj-actions/verify-changed-files from 9 to 17 in /.github/workflows #11

Bump tj-actions/verify-changed-files from 9 to 17 in /.github/workflows

Bump tj-actions/verify-changed-files from 9 to 17 in /.github/workflows #11

Workflow file for this run

name: ci
on:
push:
branches:
- main
- init
pull_request:
branches:
- main
- init
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
name: Test coverage-badge-go
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: '1.18'
- name: Run Test
run: |
go test -v ./... -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
- name: Go Coverage Badge
uses: tj-actions/[email protected]
with:
filename: coverage.out
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
with:
files: README.md
- name: Commit changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore: Updated coverage badge."
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.head_ref }}