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

Improve workflows #25

Merged
merged 2 commits into from
Sep 5, 2023
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
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# yamllint disable rule:line-length
---
name: Build and Test
on:
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, reopened]
push:
Expand Down Expand Up @@ -29,14 +31,14 @@ jobs:
- name: check no uncommitted files
run: |
echo "changed and uncommitted files, excluding versions"
diff=$(git diff -I'^\/\/\s+protoc(-gen-go)?\s+v[0-9]+\.[0-9+\.[0-9]+\s*$')
if [ -n "diff" ]; then
diff=$(git diff -I'^\/\/\s+protoc(-gen-go)?\s+v[0-9]+\.[0-9+\.[0-9]+\s*$' -- . ':!*.png' ':!*.svg')
if [ -n "$diff" ]; then
# print the diff so we can fix it, if there is an issue
echo
echo "differences other than tool version changes:"
git diff -I'^\/\/\s+protoc(-gen-go)?\s+v[0-9]+\.[0-9+\.[0-9]+\s*$'
echo "differences other than image and tool version changes:"
git diff -I'^\/\/\s+protoc(-gen-go)?\s+v[0-9]+\.[0-9+\.[0-9]+\s*$' -- . ':!*.png' ':!*.svg'
echo
echo "differences including tool version changes:"
echo "all differences:"
git diff
exit 1
fi
67 changes: 33 additions & 34 deletions .github/workflows/yetus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,36 @@
# https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token
# yamllint enable rule:line-length
---
name: Apache Yetus
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main

jobs:
yetus:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: src
fetch-depth: 0

- name: Yetus
uses: apache/[email protected]
with:
basedir: ./src
bufbasedir: ./src/proto
buildtool: nobuild
continuousimprovement: true
githubtoken: ${{ secrets.GITHUB_TOKEN }}
patchdir: ./out
reviveconfig: .revive.toml

- name: Store Yetus artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: 'yetus-scan'
path: ${{ github.workspace }}/out

name: Apache Yetus
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main

jobs:
yetus:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: src
fetch-depth: 0

- name: Yetus
uses: apache/[email protected]
with:
basedir: ./src
bufbasedir: ./src/proto
buildtool: nobuild
continuousimprovement: true
githubtoken: ${{ secrets.GITHUB_TOKEN }}
patchdir: ./out
reviveconfig: .revive.toml

- name: Store Yetus artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: 'yetus-scan'
path: ${{ github.workspace }}/out
Loading