Skip to content

Build Daily

Build Daily #396

Workflow file for this run

name: Build Daily
on:
workflow_dispatch:
schedule:
# Run daily at 7:30 AM UTC
- cron: '30 7 * * *'
permissions:
contents: read
jobs:
common:
uses: ./.github/workflows/build-common.yml
with:
cache-read-only: true
no-build-cache: true
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
lint:
uses: ./.github/workflows/reusable-lint.yml
publish-snapshots:
environment: protected
needs:
- common
runs-on: ubuntu-latest
if: github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java-contrib'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK for running Gradle
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
distribution: temurin
java-version: 21
- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true
- name: Build and publish snapshots
# Disable parallel due to Sonatype's HTTP 429 rate limiting
run: ./gradlew assemble publishToSonatype --no-parallel
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
GITHUB_TOKEN: ${{ github.token }}
workflow-notification:
permissions:
issues: write
if: always()
needs:
- common
- lint
- publish-snapshots
uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@dde3047a8f219c296772c17936b9d02bb7447af5 # v0.12.0
with:
success: >-
${{
needs.common.result == 'success' &&
needs.lint.result == 'success' &&
needs.publish-snapshots.result == 'success'
}}