Skip to content

Daily

Daily #3

Workflow file for this run

---
name: "Daily"
on:
schedule:
- cron: "00 10 * * *"
jobs:
check-last-run:
runs-on: "ubuntu-latest"
steps:
- uses: "octokit/[email protected]"
id: "check-last-run"
with:
token: "${{ secrets.GITHUB_TOKEN }}"
route: "GET /repos/${{github.repository}}/actions/workflows/daily.yml/runs?per_page=1&status=completed"
outputs:
last_sha: "${{ fromJson(steps.check-last-run.outputs.data).workflow_runs[0].head_sha }}"
publish-snapshot:
needs: ["check-last-run"]
if: "${{ needs.check-last-run.outputs.last_sha != github.sha }}"
runs-on: "macos-latest"
permissions:
packages: "write"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: "./.github/actions/setup"
- run: "./gradlew publishAllPublicationsToGitHubPackagesRepository"
env:
ORG_GRADLE_PROJECT_githubToken: "${{ secrets.GITHUB_TOKEN }}"
ORG_GRADLE_PROJECT_githubUser: "${{ github.actor }}"
dependency-submission:
needs: ["check-last-run"]
if: "${{ needs.check-last-run.outputs.last_sha != github.sha }}"
runs-on: "ubuntu-latest"
permissions:
contents: "write"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-java@v4"
with:
distribution: "temurin"
java-version: 23
- uses: "gradle/actions/dependency-submission@v4"
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
- uses: "advanced-security/[email protected]"