Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow. #15

Merged
merged 1 commit into from
Jan 23, 2025
Merged
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
27 changes: 20 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
name: Build
on: [ pull_request ]

on:
push:
branches:
- main
pull_request:
types:
- labeled
- unlabeled
- opened
- edited
- reopened
- synchronize
- ready_for_review

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
Expand All @@ -10,7 +27,7 @@ jobs:
uses: actions/checkout@v4

- name: Cache Bazel
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/bazel
Expand All @@ -19,8 +36,4 @@ jobs:
${{ runner.os }}-bazel-

- name: Build everything
run: bazel build //...

# - name: Test everything
# run: bazel test //...

run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc build //...
13 changes: 13 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file contains Bazel settings to apply on CI only.
# It is referenced with a --bazelrc option in the call to bazel in ci.yaml

# Debug where options came from
build --announce_rc
# This directory is configured in GitHub actions to be persisted between runs.
# We do not enable the repository cache to cache downloaded external artifacts
# as these are generally faster to download again than to fetch them from the
# GitHub actions cache.
build --disk_cache=~/.cache/bazel
# Don't rely on test logs being easily accessible from the test runner,
# though it makes the log noisier.
test --test_output=errors
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release

on:
push:
tags:
Expand All @@ -13,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Cache Bazel
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/bazel
Expand All @@ -22,17 +23,17 @@ jobs:
${{ runner.os }}-bazel-

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push service-one image to ghcr.io
run: bazel run --stamp --embed_label=${{ github.ref_name }} //service-one:push_image
run: bazel run --stamp --embed_label=${{ github.ref_name }} --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc //service-one:push_image

- name: Push authz image to ghcr.io
run: bazel run --stamp --embed_label=${{ github.ref_name }} //authz:push_image
run: bazel run --stamp --embed_label=${{ github.ref_name }} --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc //authz:push_image

- name: Push envoy image to ghcr.io
run: bazel run --stamp --embed_label=${{ github.ref_name }} //envoy:push_image
run: bazel run --stamp --embed_label=${{ github.ref_name }} --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc //envoy:push_image
Loading