Skip to content

Commit

Permalink
ci: Add github build
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax committed Jan 14, 2025
1 parent 75ebbf0 commit 71f5e04
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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: ${{ false && github.repository_owner == 'envoyproxy' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: |
sudo mkdir /opt/build
sudo chown runner:docker /opt/build
./build-repository.sh
du -ch /opt/build
du -ch ~/.cache
env:
CONTEXT: deploy-preview
GITHUB_TOKEN: ${{ github.token }}
6 changes: 4 additions & 2 deletions build-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ UNDERLINE="\e[4m"
NORMAL="\e[0m"

EXCLUDE_FILE=debs/excludes.txt
DEBS_ROOT=/opt/build/cache/repository
DEBS_ROOT="${DEBS_ROOT:-/opt/build/cache/repository}"
OUTPUT_DIR="${OUTPUT_DIR:-/opt/build/repo/html}"
SIGNING_KEY_PASSPHRASE="${SIGNING_KEY_PASSPHRASE:-Hackme}"


Expand Down Expand Up @@ -103,8 +104,9 @@ main () {
fi
bazel run \
"${bazel_args[@]}" \
--config=debug-bazel \
//tools/tarball:unpack \
/opt/build/repo/html
$OUTPUT_DIR
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Expand Down
1 change: 1 addition & 0 deletions debs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export APTLY_CONF="$(location //:aptly-config)"
export DEBS="$(location :debs)"
export DEBS_ROOT="$${APT_ROOT}/repository"
export SIGNING_TOKEN="$(location :signing-token)"
ls -alh /opt/build
$(location :publish)
tar hcf $@ -C $${APT_ROOT}/html .
"""
Expand Down
1 change: 1 addition & 0 deletions netlify-should-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exit 1
1 change: 1 addition & 0 deletions netlify.toml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[build]
publish = "html"
command = "./build-repository.sh"
ignore = "./netlify-should-run.sh"

[build.environment]
BAZELISK_HOME="/opt/build/cache/bazelisk"

0 comments on commit 71f5e04

Please sign in to comment.