diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c0cb09..51cd302 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,8 @@ jobs: run: sbt --no-colors +publishLocal - name: Check website build process run: sbt --no-colors docs/clean; sbt --no-colors docs/buildWebsite + - name: Check docs build on a fresh ZIO website + run: sbt --no-colors docs/checkDocsOnFreshWebsite lint: name: Lint runs-on: ubuntu-latest diff --git a/.github/workflows/regenerate-workflows.yml b/.github/workflows/regenerate-workflows.yml new file mode 100644 index 0000000..05914cb --- /dev/null +++ b/.github/workflows/regenerate-workflows.yml @@ -0,0 +1,72 @@ +# This file was autogenerated using `zio-sbt-ci` plugin via `sbt ciGenerateGithubWorkflow` +# task and should be included in the git repository. Please do not edit it manually. + +name: Regenerate CI workflows for bot PRs +env: {} +'on': + pull_request: + branches-ignore: + - gh-pages +permissions: + contents: read +concurrency: + group: regenerate-ci-workflows-${{ github.head_ref }} + cancel-in-progress: true +jobs: + regenerate: + name: regenerate + runs-on: ubuntu-latest + continue-on-error: false + permissions: + contents: write + if: ${{ (((github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate[bot]')) || (github.event.pull_request.user.login == 'zio-scala-steward[bot]')) && (github.event.pull_request.head.repo.full_name == github.repository) }} + steps: + - name: Check App Token + id: check-app-token + run: | + if [ -n "$APP_ID" ]; then + echo "configured=true" >> "$GITHUB_OUTPUT" + else + echo "configured=false" >> "$GITHUB_OUTPUT" + fi + env: + APP_ID: ${{ secrets.APP_ID }} + - name: Generate Token + id: generate-token + uses: zio/generate-github-app-token@v1.0.0 + if: ${{ steps.check-app-token.outputs.configured == 'true' }} + with: + app_id: ${{ secrets.APP_ID }} + app_private_key: ${{ secrets.APP_PRIVATE_KEY }} + - name: Git Checkout + uses: actions/checkout@v7.0.1 + with: + ref: ${{ github.head_ref }} + fetch-depth: '0' + token: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }} + - name: Setup Scala + uses: actions/setup-java@v6.0.1 + 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 + - name: Regenerate GitHub workflow files + run: sbt --no-colors ciGenerateGithubWorkflow + - name: Commit and push the regenerated files if changed + run: | + set -euo pipefail + if git diff --quiet -- .github && [ -z "$(git ls-files --others --exclude-standard -- .github)" ]; then + echo "Generated files already up to date; nothing to do." + exit 0 + fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add .github + git commit -m "chore(ci): regenerate GitHub workflows" + git push origin "HEAD:$HEAD_REF" + env: + HEAD_REF: ${{ github.head_ref }} diff --git a/project/plugins.sbt b/project/plugins.sbt index 1bc2ae2..4b4d2ff 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,8 +5,8 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.5") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.6") -addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.5") +addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.6") resolvers ++= Resolver.sonatypeOssRepos("public")