Skip to content

ci

ci #2969

Workflow file for this run

---
name: ci
on:
push:
branches:
- main
tags-ignore:
- "*"
pull_request:
branches:
- main
workflow_dispatch: {}
schedule:
- cron: 0 17 * * *
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
GRADLE_SWITCHES: --console=plain --info --stacktrace --warning-mode=all --no-daemon
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
- name: setup-gradle
uses: gradle/actions/setup-gradle@v5
- name: build
run: ./gradlew ${{ env.GRADLE_SWITCHES }} build
- name: publish-snapshots
if: github.event_name != 'pull_request'
run: ./gradlew ${{ env.GRADLE_SWITCHES }} snapshot :plugin:publishPluginMavenPublicationToSonatypeRepository -x test -x publishPlugins
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
notify:
if: (failure() || cancelled()) && github.event_name == 'schedule' && (github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Slack notify on failure
uses: slackapi/slack-github-action@v3
continue-on-error: true
with:
webhook: ${{ secrets.OPS_GITHUB_ACTIONS_WEBHOOK }}
webhook-type: incoming-webhook
payload: |
text: "❌ CI run failed for `${{ github.repository }}` - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>"