-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/loeffel-io/docker
- Loading branch information
Showing
53 changed files
with
2,461 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.4.0 | ||
8.0.0rc2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,58 @@ | ||
name: Bazel | ||
on: [ push ] | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
build: | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gcr.io/bazel-public/bazel@sha256:3348b14c7b45a4fbf06fee34996a8d15da72f43bb282a81f4720a0c0a5c37dca # v6.3.2 | ||
options: --user root # ref: https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user | ||
image: gcr.io/bazel-public/bazel@sha256:35c128509642f76fede4ade16e8c829781048f6a62a7b2d9cfbabd45246af81a | ||
options: --user root | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GOOGLE_BUCKET: https://storage.googleapis.com/ls-lint-bazel | ||
steps: | ||
- run: set -eu | ||
- uses: actions/checkout@v4 | ||
- uses: google-github-actions/auth@v1 | ||
- uses: google-github-actions/auth@v2 | ||
with: | ||
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
- run: bazel run --remote_cache=$GOOGLE_BUCKET --google_default_credentials //:gazelle_fix_diff | ||
- run: bazel test --remote_cache=$GOOGLE_BUCKET --google_default_credentials //... | ||
- run: bazel build --remote_cache=$GOOGLE_BUCKET --google_default_credentials //... | ||
- run: bazel run //cmd/ls_lint:ls-lint -- --config ${PWD}/.ls-lint.yml --workdir ${PWD} | ||
|
||
build-no-cache: # external pull requests | ||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gcr.io/bazel-public/bazel@sha256:35c128509642f76fede4ade16e8c829781048f6a62a7b2d9cfbabd45246af81a | ||
options: --user root | ||
steps: | ||
- run: set -eu | ||
- uses: actions/checkout@v4 | ||
- run: bazel run //:gazelle_fix_diff | ||
- run: bazel test //... | ||
- run: bazel build //... | ||
- run: bazel run //cmd/ls_lint:ls-lint -- --config ${PWD}/.ls-lint.yml --workdir ${PWD} | ||
|
||
release: | ||
needs: build | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gcr.io/bazel-public/bazel@sha256:3348b14c7b45a4fbf06fee34996a8d15da72f43bb282a81f4720a0c0a5c37dca # v6.3.2 | ||
image: gcr.io/bazel-public/bazel@sha256:35c128509642f76fede4ade16e8c829781048f6a62a7b2d9cfbabd45246af81a | ||
options: --user root # ref: https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
STABLE_GIT_TAG: ${{ github.ref_name }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GOOGLE_BUCKET: https://storage.googleapis.com/ls-lint-bazel | ||
steps: | ||
- run: set -eu && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs | ||
- run: set -eu | ||
- uses: actions/checkout@v4 | ||
- uses: google-github-actions/auth@v1 | ||
- uses: google-github-actions/auth@v2 | ||
with: | ||
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
- run: bazel run --remote_cache=$GOOGLE_BUCKET --google_default_credentials //deployments/github:ls_lint_publish | ||
- run: bazel build --remote_cache=$GOOGLE_BUCKET --google_default_credentials //deployments/npm:ls_lint | ||
- run: (cd bazel-bin/deployments/npm/ls_lint && NPM_CONFIG_USERCONFIG=${GITHUB_WORKSPACE}/deployments/npm/.npmrc npm publish --no-git-checks) # workaround: https://bazelbuild.slack.com/archives/CEZUUKQ6P/p1667995025343689 # --dry-run --tag beta | ||
- run: NPM_CONFIG_USERCONFIG=${GITHUB_WORKSPACE}/deployments/npm/.npmrc bazel run --remote_cache=$GOOGLE_BUCKET --google_default_credentials //deployments/npm:ls_lint.publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
ls: | ||
.dir: snake_case | ||
.bzl: snake_case | ||
.sh: snake_case | ||
.*: snake_case | ||
.*.*: snake_case | ||
.*.*.*: exists:0 | ||
.png: exists:0 | ||
.jpg: exists:0 | ||
.md: SCREAMING_SNAKE_CASE | ||
.bazel: SCREAMING_SNAKE_CASE | ||
.go: snake_case | ||
.yaml: snake_case | ||
.js: snake_case | ||
.bazel.lock: SCREAMING_SNAKE_CASE | ||
|
||
examples/**: # allow only .yml files | ||
.dir: snake_case | ||
.*: exists:0 | ||
.yml: kebab-case | ||
|
||
assets/**: # allow only .png files | ||
.dir: snake_case | ||
.*: exists:0 | ||
.png: kebab-case | ||
|
||
ignore: | ||
- .git | ||
- .github | ||
- .idea | ||
- genhtml | ||
- bazel-* | ||
- deployments/npm/pnpm-lock.yaml | ||
- gha-* | ||
- deployments/npm/pnpm-lock.yaml | ||
- deployments/docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
bazel_dep(name = "platforms", version = "0.0.10", dev_dependency = True) | ||
bazel_dep(name = "rules_go", version = "0.50.1", dev_dependency = True) | ||
bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True) | ||
bazel_dep(name = "rules_pkg", version = "1.0.1", dev_dependency = True) | ||
bazel_dep(name = "aspect_bazel_lib", version = "2.9.4", dev_dependency = True) | ||
bazel_dep(name = "aspect_rules_js", version = "2.1.0", dev_dependency = True) | ||
|
||
#################################################################### | ||
# rules_go ######################################################### | ||
#################################################################### | ||
|
||
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") | ||
go_sdk.download(version = "1.23.3") | ||
go_sdk.nogo(nogo = "//:nogo") | ||
|
||
#################################################################### | ||
# gazelle ########################################################## | ||
# upgrade with bazel run @rules_go//go mod tidy && bazel mod tidy ## | ||
#################################################################### | ||
|
||
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") | ||
go_deps.from_file(go_mod = "//:go.mod") | ||
use_repo( | ||
go_deps, | ||
"com_github_bmatcuk_doublestar_v4", | ||
"in_gopkg_yaml_v3", | ||
"org_golang_x_sync", | ||
) | ||
|
||
#################################################################### | ||
# rules_js ######################################################### | ||
#################################################################### | ||
|
||
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True) | ||
npm.npm_translate_lock( | ||
name = "npm", | ||
npmrc = "//deployments/npm:.npmrc", | ||
pnpm_lock = "//deployments/npm:pnpm-lock.yaml", | ||
) | ||
use_repo(npm, "npm") | ||
|
||
#################################################################### | ||
# rules_python ##################################################### | ||
# https://github.com/bazelbuild/rules_python/pull/713 ############## | ||
#################################################################### | ||
|
||
bazel_dep(name = "rules_python", version = "0.40.0") | ||
|
||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
python.toolchain( | ||
ignore_root_user_error = True, | ||
python_version = "3.13", | ||
) | ||
|
||
#################################################################### | ||
# github cli ####################################################### | ||
#################################################################### | ||
|
||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "com_github_cli_cli_darwin_arm64", | ||
build_file_content = """exports_files(glob(["bin/*"]))""", | ||
sha256 = "fdb77f31b8a6dd23c3fd858758d692a45f7fc76383e37d475bdcae038df92afc", | ||
strip_prefix = "gh_2.62.0_macOS_arm64", | ||
urls = [ | ||
"https://github.com/cli/cli/releases/download/v2.62.0/gh_2.62.0_macOS_arm64.zip", | ||
], | ||
) | ||
|
||
http_archive( | ||
name = "com_github_cli_cli_linux_amd64", | ||
build_file_content = """exports_files(glob(["bin/*"]))""", | ||
sha256 = "41c8b0698ad3003cb5c44bde672a1ffd5f818595abd80162fbf8cc999418446a", | ||
strip_prefix = "gh_2.62.0_linux_amd64", | ||
urls = [ | ||
"https://github.com/cli/cli/releases/download/v2.62.0/gh_2.62.0_linux_amd64.tar.gz", | ||
], | ||
) | ||
|
||
#################################################################### | ||
# coreutils (sha256) ############################################### | ||
#################################################################### | ||
|
||
http_archive( | ||
name = "com_github_uutils_coreutils_darwin_arm64", | ||
build_file_content = """exports_files(["coreutils"])""", | ||
sha256 = "bbd9b97fc38b9e8841feb93b5684f3587afb3d651a1cc91e46d00b1b0bcf28f6", | ||
strip_prefix = "coreutils-0.0.28-aarch64-apple-darwin", | ||
urls = [ | ||
"https://github.com/uutils/coreutils/releases/download/0.0.28/coreutils-0.0.28-aarch64-apple-darwin.tar.gz", | ||
], | ||
) | ||
|
||
http_archive( | ||
name = "com_github_uutils_coreutils_linux_amd64", | ||
build_file_content = """exports_files(["coreutils"])""", | ||
sha256 = "e22a4a9179bbde667865917dc1399e4686a18159da35be6c1b78582c52a373a2", | ||
strip_prefix = "coreutils-0.0.28-x86_64-unknown-linux-gnu", | ||
urls = [ | ||
"https://github.com/uutils/coreutils/releases/download/0.0.28/coreutils-0.0.28-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
) |
Oops, something went wrong.