From becc898bb75a20abc5057b4e158a2bf886a4752f Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Fri, 10 Jan 2025 13:48:56 +0000 Subject: [PATCH] ci: Add github build Signed-off-by: Ryan Northey --- .bazelrc | 3 +++ .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ build-repository.sh | 3 +++ netlify-should-run.sh | 1 + netlify.toml | 1 + 5 files changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 netlify-should-run.sh mode change 100644 => 100755 netlify.toml diff --git a/.bazelrc b/.bazelrc index 307f727..a1756ed 100644 --- a/.bazelrc +++ b/.bazelrc @@ -18,3 +18,6 @@ common:publish-ci --config=debs-ci common:publish-ci --//tools/tarball:target=//:html common:publish-ci --//tools/tarball:overwrite=//tools/tarball:true common:publish-ci --//debs:signing-token=//debs:signing-token.txt + +common:debug-bazel --announce_rc +common:debug-bazel -s diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1b70417 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +permissions: + contents: read + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: >- + ${{ github.event.inputs.head_ref || github.run_id }} + + +jobs: + build: + runs-on: ubuntu-latest-8-cores + if: github.repository_owner == 'envoyproxy' + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - run: | + ./build-repository.sh + env: + CONTEXT: deploy-preview diff --git a/build-repository.sh b/build-repository.sh index 1e27494..17fe888 100755 --- a/build-repository.sh +++ b/build-repository.sh @@ -27,6 +27,8 @@ underline () { } import_public_key () { + mkdir -p ~/.gnupg + # chmod 700 ~/.gnupg touch ~/.gnupg/trustedkeys.gpg echo -e "$(underline $(bold "Import maintainers public key: checksum verification"))" gpg --import envoy-maintainers-public.key @@ -102,6 +104,7 @@ main () { fi bazel run \ "${bazel_args[@]}" \ + --config=debug-bazel \ //tools/tarball:unpack \ /opt/build/repo/html } diff --git a/netlify-should-run.sh b/netlify-should-run.sh new file mode 100644 index 0000000..379a4c9 --- /dev/null +++ b/netlify-should-run.sh @@ -0,0 +1 @@ +exit 1 diff --git a/netlify.toml b/netlify.toml old mode 100644 new mode 100755 index fbc62be..8dbfa38 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,7 @@ [build] publish = "html" command = "./build-repository.sh" +ignore = "./netlify-should-run.sh" [build.environment] BAZELISK_HOME="/opt/build/cache/bazelisk"