update pbuf cli to the latest versions (#18) #45
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: Build and Test pbuf | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths-ignore: | |
| - '**/**.md' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go Environment | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.25.x | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.7 | |
| - name: Build Go | |
| run: CGO_ENABLED=0 GOOS=linux make build | |
| - name: Build Docker Image | |
| run: make docker | |
| - name: Run pbuf vendor in Docker and Verify Files | |
| run: | | |
| docker run --rm -v $(pwd)/vendor:/tmp/vendor -w /tmp/vendor pbuf sh -c "cp /app/pbuf.yaml /tmp/vendor && /app/pbuf vendor" | |
| if [ ! -f ./vendor/proto/addressbook.proto ]; then | |
| echo "Address book proto file from main branch is not found" | |
| exit 1 | |
| fi | |
| if [ ! -f ./vendor/examples/addressbook.proto ]; then | |
| echo "Address book proto file from tag v24.4 is not found" | |
| exit 1 | |
| fi | |
| if [ ! -f ./vendor/custom/addressbook.proto ]; then | |
| echo "Address book proto file for custom is not found" | |
| exit 1 | |
| fi | |
| shell: bash |