Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: proto break change doesnt run all the time #2130

Merged
merged 20 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/check-proto-break.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,25 @@ on:
- edited

jobs:
check-if-code-change:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.check.outputs.change }}
steps:
- uses: actions/checkout@v4
with:
go-version: '1.20'
fetch-depth: 0
- run: |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then
echo "::set-output name=change::false"
else
echo "::set-output name=change::true"
fi
id: check
check-proto-break:
needs: check-if-code-change
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,25 @@ on:
merge_group:

jobs:
check-if-code-change:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.check.outputs.change }}
steps:
- uses: actions/checkout@v4
with:
go-version: '1.20'
fetch-depth: 0
- run: |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then
echo "::set-output name=change::false"
else
echo "::set-output name=change::true"
fi
id: check
gofmt:
needs: check-if-code-change
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
name: gofmt
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,25 @@ env:
GOLINT_VERSION: v1.53.3

jobs:
check-if-code-change:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.check.outputs.change }}
steps:
- uses: actions/checkout@v4
with:
go-version: '1.20'
fetch-depth: 0
- run: |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then
echo "::set-output name=change::false"
else
echo "::set-output name=change::true"
fi
id: check
golangci:
needs: check-if-code-change
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
name: golang-lint
runs-on: ubuntu-latest
steps:
Expand Down
Loading