Skip to content
Open
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
20 changes: 18 additions & 2 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,24 @@ jobs:
if: ${{ github.event_name == 'pull_request_target' }}
run: |
set -euo pipefail
protected=$(gh api "repos/$GH_REPO/branches/$BASE" \
--jq '.protection.required_status_checks.contexts | length')
ruleset=$(gh api "repos/$GH_REPO/rules/branches/$BASE" \
--jq '[.[] | select(.type == "required_status_checks")] | length')
if [ $((protected + ruleset)) -gt 0 ]; then
echo "$BASE requires status checks, enabling auto-merge"
gh pr merge --auto --squash "$PR"
exit 0
fi
echo "$BASE has no required status checks, waiting for CI before merging"
while true; do
checks=$(gh pr checks "$PR" --json name,bucket \
--jq '[.[] | select(.name != "auto-merge" and .name != "auto-approve-bot-prs")]' 2>/dev/null || true)
if ! checks=$(gh pr checks "$PR" --json name,bucket \
--jq '[.[] | select(.name != "auto-merge" and .name != "auto-approve-bot-prs")]' 2>&1); then
case "$checks" in
*"no checks reported"*) checks='[]' ;;
*) echo "$checks" >&2; exit 1 ;;
esac
fi
checks=${checks:-[]}
total=$(jq length <<< "$checks")
pending=$(jq '[.[] | select(.bucket == "pending")] | length' <<< "$checks")
Expand All @@ -70,6 +85,7 @@ jobs:
GH_TOKEN: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR: ${{ github.event.number }}
BASE: ${{ github.event.pull_request.base.ref }}
- name: Backfill auto-merge for existing bot PRs
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Check all code compiles
run: sbt --no-colors +Test/compile
- name: Check artifacts build process
Expand All @@ -61,15 +61,15 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Check if the site workflow is up to date
run: sbt --no-colors ciCheckGithubWorkflow
- name: Lint
Expand Down Expand Up @@ -97,15 +97,15 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Git Checkout
uses: actions/checkout@v7.0.1
with:
Expand All @@ -128,15 +128,15 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Generate Readme
run: sbt --no-colors docs/generateReadme
- name: Generate Token
Expand Down Expand Up @@ -204,15 +204,15 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Release
run: sbt --no-colors ci-release
env:
Expand All @@ -235,19 +235,19 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Setup NodeJs
uses: actions/setup-node@v7.0.0
uses: actions/setup-node@v7.1.0
with:
node-version: 24.12.0
node-version: 24.22.1
registry-url: https://registry.npmjs.org
- name: Publish Docs to NPM Registry
run: sbt --no-colors docs/publishToNpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regenerate-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
fetch-depth: '0'
token: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
- name: Setup Scala
uses: actions/setup-java@v6.0.1
uses: actions/setup-java@v6.1.0
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1.5.7
- name: Cache Dependencies
uses: coursier/cache-action@v8.1.1
uses: coursier/cache-action@v8.2.0
- name: Regenerate GitHub workflow files
run: sbt --no-colors ciGenerateGithubWorkflow
- name: Commit and push the regenerated files if changed
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.13.0")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.6")
addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.6")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.7")
addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.7")

resolvers += Resolver.sonatypeRepo("public")
Loading