Skip to content

Commit

Permalink
Merge branch 'main' into ed/docInputs
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Jul 2, 2024
2 parents f55303e + 4f09745 commit f9efb4d
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 27 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ permissions:
contents: read
pull-requests: write
env:
BUF_VERSION: "1.33.0"
BUF_VERSION: "1.34.0"
BUF_MODULE: ${{ vars.BUF_MODULE }}
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -219,7 +220,7 @@ jobs:
BUF_USERNAME: ${{ secrets.BUF_USERNAME }}
run: |
mkdir -p proto/foo/v1
printf "version: v2\nmodules:\n - path: proto\n name: buf.build/${BUF_USERNAME}/foo\n" > buf.yaml
printf "version: v2\nmodules:\n - path: proto\n name: ${BUF_MODULE}\n" > buf.yaml
printf "syntax = \"proto3\";\npackage foo.v1;\nmessage Bar {}\n" > proto/foo/v1/bar.proto
- uses: ./
with:
Expand All @@ -241,7 +242,7 @@ jobs:
BUF_USERNAME: ${{ secrets.BUF_USERNAME }}
run: |
mkdir -p proto/foo/v1
printf "version: v2\nmodules:\n - path: proto\n name: buf.build/${BUF_USERNAME}/foo\n" > buf.yaml
printf "version: v2\nmodules:\n - path: proto\n name: ${BUF_MODULE}\n" > buf.yaml
printf "syntax = \"proto3\";\npackage foo.v1;\nmessage Bar {}\n" > proto/foo/v1/bar.proto
- uses: ./
with:
Expand Down Expand Up @@ -295,7 +296,7 @@ jobs:
mkdir -p foo/foo/v1 bar/bar/v1
printf "syntax = \"proto3\";\npackage foo.v1;\nmessage Bar {}\n" > foo/foo/v1/bar.proto
printf "syntax = \"proto3\";\npackage bar.v1;\nmessage Foo {}\n" > bar/bar/v1/foo.proto
printf "version: v2\nmodules:\n - path: foo\n name: buf.build/${BUF_USERNAME}/foo\n - path: bar\n" > buf.yaml
printf "version: v2\nmodules:\n - path: foo\n name: ${BUF_MODULE}\n - path: bar\n" > buf.yaml
- uses: ./
with:
username: ${{ secrets.BUF_USERNAME }}
Expand All @@ -319,7 +320,7 @@ jobs:
BUF_USERNAME: ${{ secrets.BUF_USERNAME }}
run: |
mkdir -p proto/foo/v1
printf "version: v2\nmodules:\n - path: proto\n name: buf.build/${BUF_USERNAME}/foo\n" > buf.yaml
printf "version: v2\nmodules:\n - path: proto\n name: ${BUF_MODULE}\n" > buf.yaml
printf "syntax = \"proto3\";\npackage foo.v1;\nmessage Bar {}\n" > proto/foo/v1/bar.proto
- uses: ./
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SHELL := bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-print-directory
BUF_VERSION ?= 1.33.0
BUF_VERSION ?= 1.34.0

UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ For reproducible builds, you can pin to an explicit version of `buf` by setting
```yaml
- uses: bufbuild/[email protected]
with:
version: 1.33.0
version: 1.34.0
```

If no version is specified in the workflow config, the action will resolve the version in order of precendence:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inputs:
Version of the Buf CLI to use.
Example:
with:
version: 1.33.0
version: 1.34.0
required: false
username:
description: |-
Expand Down
18 changes: 9 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53946,7 +53946,7 @@ var semver = __nccwpck_require__(1383);


// requiredVersion is the minimum version of buf required.
const requiredVersion = ">=1.32.0";
const requiredVersion = ">=1.34.0";
// installBuf installs the buf binary and returns the path to the binary. The
// versionInput should be an explicit version of buf.
async function installBuf(github, versionInput) {
Expand Down Expand Up @@ -54313,7 +54313,7 @@ async function build(bufPath, inputs) {
// lint runs the "buf lint" step.
async function lint(bufPath, inputs) {
if (!inputs.lint) {
core.info("Skipping lint");
core.debug("Skipping lint");
return skip();
}
const args = ["lint", "--error-format", "github-actions"];
Expand All @@ -54331,7 +54331,7 @@ async function lint(bufPath, inputs) {
// format runs the "buf format" step.
async function format(bufPath, inputs) {
if (!inputs.format) {
core.info("Skipping format");
core.debug("Skipping format");
return skip();
}
const args = [
Expand All @@ -54355,7 +54355,7 @@ async function format(bufPath, inputs) {
// breaking runs the "buf breaking" step.
async function breaking(bufPath, inputs) {
if (!inputs.breaking) {
core.info("Skipping breaking");
core.debug("Skipping breaking");
return skip();
}
const args = [
Expand All @@ -54382,11 +54382,11 @@ async function breaking(bufPath, inputs) {
// push runs the "buf push" step.
async function push(bufPath, inputs, moduleNames) {
if (!inputs.push) {
core.info("Skipping push");
core.debug("Skipping push");
return skip();
}
if (moduleNames.length == 0) {
core.info("Skipping push, no named modules detected");
core.debug("Skipping push, no named modules detected");
return skip();
}
const args = [
Expand All @@ -54407,15 +54407,15 @@ async function push(bufPath, inputs, moduleNames) {
// archive runs the "buf archive" step.
async function archive(inputs, moduleNames) {
if (!inputs.archive) {
core.info("Skipping archive");
core.debug("Skipping archive");
return skip();
}
if (moduleNames.length == 0) {
core.info("Skipping archive, no named modules detected");
core.debug("Skipping archive, no named modules detected");
return skip();
}
if (inputs.archive_labels.length == 0) {
core.info("Skipping archive, no labels provided");
core.debug("Skipping archive, no labels provided");
return skip();
}
for (const moduleName of moduleNames) {
Expand Down
2 changes: 1 addition & 1 deletion examples/version-input/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- uses: bufbuild/[email protected]
with:
setup_only: true
version: 1.33.0
version: 1.34.0
- run: buf version
2 changes: 1 addition & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as semver from "semver";
import { getEnv } from "./inputs";

// requiredVersion is the minimum version of buf required.
const requiredVersion = ">=1.32.0";
const requiredVersion = ">=1.34.0";

// installBuf installs the buf binary and returns the path to the binary. The
// versionInput should be an explicit version of buf.
Expand Down
16 changes: 8 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async function build(bufPath: string, inputs: Inputs): Promise<Result> {
// lint runs the "buf lint" step.
async function lint(bufPath: string, inputs: Inputs): Promise<Result> {
if (!inputs.lint) {
core.info("Skipping lint");
core.debug("Skipping lint");
return skip();
}
const args = ["lint", "--error-format", "github-actions"];
Expand All @@ -183,7 +183,7 @@ async function lint(bufPath: string, inputs: Inputs): Promise<Result> {
// format runs the "buf format" step.
async function format(bufPath: string, inputs: Inputs): Promise<Result> {
if (!inputs.format) {
core.info("Skipping format");
core.debug("Skipping format");
return skip();
}
const args = [
Expand All @@ -208,7 +208,7 @@ async function format(bufPath: string, inputs: Inputs): Promise<Result> {
// breaking runs the "buf breaking" step.
async function breaking(bufPath: string, inputs: Inputs): Promise<Result> {
if (!inputs.breaking) {
core.info("Skipping breaking");
core.debug("Skipping breaking");
return skip();
}
const args = [
Expand Down Expand Up @@ -240,11 +240,11 @@ async function push(
moduleNames: ModuleName[],
): Promise<Result> {
if (!inputs.push) {
core.info("Skipping push");
core.debug("Skipping push");
return skip();
}
if (moduleNames.length == 0) {
core.info("Skipping push, no named modules detected");
core.debug("Skipping push, no named modules detected");
return skip();
}
const args = [
Expand All @@ -269,15 +269,15 @@ async function archive(
moduleNames: ModuleName[],
): Promise<Result> {
if (!inputs.archive) {
core.info("Skipping archive");
core.debug("Skipping archive");
return skip();
}
if (moduleNames.length == 0) {
core.info("Skipping archive, no named modules detected");
core.debug("Skipping archive, no named modules detected");
return skip();
}
if (inputs.archive_labels.length == 0) {
core.info("Skipping archive, no labels provided");
core.debug("Skipping archive, no labels provided");
return skip();
}
for (const moduleName of moduleNames) {
Expand Down

0 comments on commit f9efb4d

Please sign in to comment.