Skip to content
Draft
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
34 changes: 34 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
skip-publishing: ${{ steps.publishing.outputs.skip }}
tests: ${{ steps.tests.outputs.output }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@5171ddd579f53dcef432bc54e16e2d2c90864968 # actions-v0.4.13
Expand All @@ -29,6 +30,38 @@ jobs:
- 'actions/**'
- 'js/**'
- '.github/workflows/actions.yml'
- name: Detect cross-stack publish
id: publishing
if: github.event_name == 'push'
shell: bash
run: |
is_non_dev() {
local file="$1"
local version
version="$(tr -d '[:space:]' < "$file")"
[[ "$version" != *-dev ]]
}

self_publishing=false
others_publishing=false

if is_non_dev actions/VERSION.txt; then
self_publishing=true
fi

for file in bazel/VERSION.txt BINS_VERSION.txt docker/build/VERSION.txt py/VERSION.txt; do
if is_non_dev "$file"; then
others_publishing=true
break
fi
done

if [[ "$others_publishing" == "true" && "$self_publishing" == "false" ]]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "Other stack(s) publishing - skipping heavy jobs"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- id: tests
uses: envoyproxy/toolshed/actions/bson@5171ddd579f53dcef432bc54e16e2d2c90864968 # actions-v0.4.13
with:
Expand All @@ -45,6 +78,7 @@ jobs:
needs: request
if: >-
fromJSON(needs.request.outputs.run)
&& needs.request.outputs.skip-publishing != 'true'
&& needs.request.outputs.tests != '[]'
strategy:
fail-fast: false
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
skip-publishing: ${{ steps.publishing.outputs.skip }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@5171ddd579f53dcef432bc54e16e2d2c90864968 # actions-v0.4.13
id: filter
Expand All @@ -30,6 +31,38 @@ jobs:
- bazel/**
- .github/workflows/bazel.yml
- .github/workflows/_bazel.yml
- name: Detect cross-stack publish
id: publishing
if: github.event_name == 'push'
shell: bash
run: |
is_non_dev() {
local file="$1"
local version
version="$(tr -d '[:space:]' < "$file")"
[[ "$version" != *-dev ]]
}

self_publishing=false
others_publishing=false

if is_non_dev bazel/VERSION.txt || is_non_dev BINS_VERSION.txt; then
self_publishing=true
fi

for file in actions/VERSION.txt docker/build/VERSION.txt py/VERSION.txt; do
if is_non_dev "$file"; then
others_publishing=true
break
fi
done

if [[ "$others_publishing" == "true" && "$self_publishing" == "false" ]]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "Other stack(s) publishing - skipping heavy jobs"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

test:
permissions:
Expand All @@ -39,6 +72,7 @@ jobs:
if: >-
always()
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
uses: ./.github/workflows/_bazel.yml
with:
action: test
Expand Down Expand Up @@ -68,6 +102,7 @@ jobs:
if: >-
always()
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
uses: ./.github/workflows/_bazel.yml
with:
action: build
Expand Down Expand Up @@ -104,6 +139,7 @@ jobs:
if: >-
always()
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
uses: ./.github/workflows/_bazel.yml
with:
action: build
Expand Down Expand Up @@ -134,6 +170,7 @@ jobs:
if: >-
always()
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
strategy:
fail-fast: false
matrix:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
skip-publishing: ${{ steps.publishing.outputs.skip }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@5171ddd579f53dcef432bc54e16e2d2c90864968 # actions-v0.4.13
id: filter
Expand All @@ -30,13 +31,46 @@ jobs:
- '.github/workflows/docker.yml'
- '.github/docker-manifests.yml'
- 'docker/build/VERSION.txt'
- name: Detect cross-stack publish
id: publishing
if: github.event_name == 'push'
shell: bash
run: |
is_non_dev() {
local file="$1"
local version
version="$(tr -d '[:space:]' < "$file")"
[[ "$version" != *-dev ]]
}

self_publishing=false
others_publishing=false

if is_non_dev docker/build/VERSION.txt; then
self_publishing=true
fi

for file in actions/VERSION.txt bazel/VERSION.txt BINS_VERSION.txt py/VERSION.txt; do
if is_non_dev "$file"; then
others_publishing=true
break
fi
done

if [[ "$others_publishing" == "true" && "$self_publishing" == "false" ]]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "Other stack(s) publishing - skipping heavy jobs"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

build:
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
needs: request
if: >-
github.repository_owner == 'envoyproxy'
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
strategy:
fail-fast: false
matrix:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
skip-publishing: ${{ steps.publishing.outputs.skip }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@5171ddd579f53dcef432bc54e16e2d2c90864968 # actions-v0.4.13
id: filter
Expand All @@ -37,13 +38,46 @@ jobs:
- 'mypy.ini'
- 'pytest.ini'
- 'py/**'
- name: Detect cross-stack publish
id: publishing
if: github.event_name == 'push'
shell: bash
run: |
is_non_dev() {
local file="$1"
local version
version="$(tr -d '[:space:]' < "$file")"
[[ "$version" != *-dev ]]
}

self_publishing=false
others_publishing=false

if is_non_dev py/VERSION.txt; then
self_publishing=true
fi

for file in actions/VERSION.txt bazel/VERSION.txt BINS_VERSION.txt docker/build/VERSION.txt; do
if is_non_dev "$file"; then
others_publishing=true
break
fi
done

if [[ "$others_publishing" == "true" && "$self_publishing" == "false" ]]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "Other stack(s) publishing - skipping heavy jobs"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

test:
runs-on: ubuntu-24.04
needs: request
if: >-
github.repository_owner == 'envoyproxy'
&& fromJSON(needs.request.outputs.run)
&& needs.request.outputs.skip-publishing != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand All @@ -67,6 +101,7 @@ jobs:
needs: request
if: >-
fromJSON(needs.request.outputs.run)
&& needs.request.outputs.skip-publishing != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand All @@ -85,6 +120,7 @@ jobs:
needs: request
if: >-
fromJSON(needs.request.outputs.run)
&& needs.request.outputs.skip-publishing != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down Expand Up @@ -124,6 +160,7 @@ jobs:
# - docs
if: >-
fromJSON(needs.request.outputs.run)
&& needs.request.outputs.skip-publishing != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
skip-publishing: ${{ steps.publishing.outputs.skip }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@5171ddd579f53dcef432bc54e16e2d2c90864968 # actions-v0.4.13
id: filter
Expand All @@ -29,13 +30,46 @@ jobs:
- BINS_VERSION.txt
- 'rust/**'
- '.github/workflows/rust.yml'
- name: Detect cross-stack publish
id: publishing
if: github.event_name == 'push'
shell: bash
run: |
is_non_dev() {
local file="$1"
local version
version="$(tr -d '[:space:]' < "$file")"
[[ "$version" != *-dev ]]
}

self_publishing=false
others_publishing=false

if is_non_dev BINS_VERSION.txt; then
self_publishing=true
fi

for file in actions/VERSION.txt bazel/VERSION.txt docker/build/VERSION.txt py/VERSION.txt; do
if is_non_dev "$file"; then
others_publishing=true
break
fi
done

if [[ "$others_publishing" == "true" && "$self_publishing" == "false" ]]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "Other stack(s) publishing - skipping heavy jobs"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

test:
runs-on: ubuntu-24.04
needs: request
if: >-
github.repository_owner == 'envoyproxy'
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -70,6 +104,7 @@ jobs:
if: >-
always()
&& fromJSON(needs.request.outputs.run || 'false')
&& needs.request.outputs.skip-publishing != 'true'
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
Expand Down