Skip to content

Commit 12da53c

Browse files
authored
Fix gitHub action to upgrade envoy protos (#197)
Signed-off-by: rulex123 <[email protected]>
1 parent e64ff08 commit 12da53c

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/update-protobuf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Run scripts
1515
working-directory: ./tools/
1616
run: |
17-
./update-sha.sh ${{ github.event.inputs.envoy_version }} | tee /dev/tty > API_SHAS
17+
./update-sha.sh ${{ github.event.inputs.envoy_version }} | tee API_SHAS
1818
./update-api.sh
1919
- name: Create Pull Request
2020
uses: peter-evans/create-pull-request@v3

tools/update-api.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ pushd "${tmpdir}" >/dev/null
3030

3131
rm -rf "${protodir}"
3232

33-
curl -sL https://github.com/envoyproxy/envoy/archive/${ENVOY_SHA}.tar.gz | tar xz --include="*.proto"
33+
curl -sL https://github.com/envoyproxy/envoy/archive/${ENVOY_SHA}.tar.gz | tar xz --wildcards '*.proto'
3434
mkdir -p "${protodir}/envoy"
3535
cp -r envoy-*/api/envoy/* "${protodir}/envoy"
3636

37-
curl -sL https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_SHA}.tar.gz | tar xz --include="*.proto"
37+
curl -sL https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_SHA}.tar.gz | tar xz --wildcards '*.proto'
3838
mkdir -p "${protodir}/google/api"
3939
mkdir -p "${protodir}/google/api/expr/v1alpha1"
4040
mkdir -p "${protodir}/google/rpc"
@@ -43,25 +43,25 @@ cp googleapis-*/google/api/expr/v1alpha1/syntax.proto "${protodir}/google/api/ex
4343
cp googleapis-*/google/api/expr/v1alpha1/checked.proto "${protodir}/google/api/expr/v1alpha1"
4444
cp googleapis-*/google/rpc/status.proto "${protodir}/google/rpc"
4545

46-
curl -sL https://github.com/envoyproxy/protoc-gen-validate/archive/v${PGV_VERSION}.tar.gz | tar xz --include="*.proto"
46+
curl -sL https://github.com/envoyproxy/protoc-gen-validate/archive/v${PGV_VERSION}.tar.gz | tar xz --wildcards '*.proto'
4747
mkdir -p "${protodir}/validate"
4848
cp -r protoc-gen-validate-*/validate/* "${protodir}/validate"
4949

50-
curl -sL https://github.com/census-instrumentation/opencensus-proto/archive/v${OPENCENSUS_VERSION}.tar.gz | tar xz --include="*.proto"
50+
curl -sL https://github.com/census-instrumentation/opencensus-proto/archive/v${OPENCENSUS_VERSION}.tar.gz | tar xz --wildcards '*.proto'
5151
mkdir -p "${protodir}/opencensus/proto"
5252
cp -r opencensus-proto-*/src/opencensus/proto/* "${protodir}/opencensus/proto"
5353

54-
curl -sL https://github.com/prometheus/client_model/archive/${PROMETHEUS_SHA}.tar.gz | tar xz --include="*.proto"
54+
curl -sL https://github.com/prometheus/client_model/archive/${PROMETHEUS_SHA}.tar.gz | tar xz --wildcards '*.proto'
5555
mkdir -p "${protodir}/io/prometheus/client/"
5656
cp client_model-*/io/prometheus/client/metrics.proto "${protodir}/io/prometheus/client/"
5757

58-
curl -sL https://github.com/cncf/xds/archive/${UDPA_SHA}.tar.gz | tar xz --include="*.proto"
58+
curl -sL https://github.com/cncf/xds/archive/${UDPA_SHA}.tar.gz | tar xz --wildcards '*.proto'
5959
mkdir -p "${protodir}/udpa"
6060
mkdir -p "${protodir}/xds"
6161
cp -r xds-*/udpa/* "${protodir}/udpa"
6262
cp -r xds-*/xds/* "${protodir}/xds"
6363

64-
curl -sL https://github.com/open-telemetry/opentelemetry-proto/archive/v${OPENTELEMETRY_VERSION}.tar.gz | tar xz --include="*.proto"
64+
curl -sL https://github.com/open-telemetry/opentelemetry-proto/archive/v${OPENTELEMETRY_VERSION}.tar.gz | tar xz --wildcards '*.proto'
6565
mkdir -p "${protodir}/opentelemetry/proto"
6666
cp -r opentelemetry-proto-*/opentelemetry/proto/* "${protodir}/opentelemetry/proto"
6767

tools/update-sha.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/env bash
22

3+
set -o errexit
4+
set -o pipefail
5+
set -o nounset
6+
set -o xtrace
7+
38
function find_sha() {
49
local CONTENT=$1
510
local DEPENDENCY=$2

0 commit comments

Comments
 (0)