Skip to content

🌱 Add CI to check if golang version updated #1

🌱 Add CI to check if golang version updated

🌱 Add CI to check if golang version updated #1

Workflow file for this run

on:
pull_request:
paths:
- 'go.mod'
branches:
- 'main'
jobs:
go-verdiff:
runs-on: ubuntu-latest
name: Verify golang version changes
steps:
- uses: actions/checkout@v4
with:

Check failure on line 13 in .github/workflows/go-verdiff.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/go-verdiff.yaml

Invalid workflow file

The workflow is not valid. .github/workflows/go-verdiff.yaml (Line: 13, Col: 12): Unexpected value '' .github/workflows/go-verdiff.yaml (Line: 14, Col: 7): Unexpected value 'fetch-depth'
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
- name: Get changed files
id: changed-files
run: |
old=$(git grep -ohP '^go .*$' main -- go.mod)
new=$(git grep -ohP '^go .*$' go.mod)
if [ ${new} != ${old} ]; then
echo "New version of golang found: ${new} vs ${old}"
exit 1
fi