Skip to content

Bazel Steward 🀡 #330

Bazel Steward 🀡

Bazel Steward 🀡 #330

# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2025 The Enola <https://enola.dev> Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Bazel Steward 🀡
# https://github.com/peter-evans/create-pull-request
# See https://github.com/VirtusLab/bazel-steward/issues/420:
permissions:
contents: write
pull-requests: write
# https://virtuslab.github.io/bazel-steward/docs/installation.html
on:
workflow_dispatch:
schedule:
- cron: "30 5 * * *" # runs every day at 5:30 am
jobs:
bazel-steward:
runs-on: ubuntu-latest
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md
# #restrictions-on-repository-forks
# https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
# if: github.event.pull_request.head.repo.full_name == github.repository
if: github.repository == 'enola-dev/enola' # Don't do this in forks
steps:
- name: Install Buildifier
run: |
go install github.com/bazelbuild/buildtools/buildifier@latest
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Configure steward@ Git User
run: |
git config user.name "Bazel Steward 🀡"
git config user.email "[email protected]"
- uses: VirtusLab/[email protected]
# NB: Cannot use hash instead of version here due to
# TODO https://github.com/VirtusLab/bazel-steward/issues/414.
with:
# NB: https://github.com/VirtusLab/bazel-steward/issues/419
configuration-path: .bazel-steward.yaml
github-personal-token: ${{ secrets.BAZEL_STEWARD }}
additional-args: "--update-all-prs"