Skip to content

Build (main)

Build (main) #28

Workflow file for this run

# Generated from Workflow.pkl. DO NOT EDIT.
name: Build (main)
'on':
push:
branches:
- main
tags-ignore:
- '**'
workflow_dispatch:
inputs:
source_run:
description: The source GitHub Action workflow run triggering this build
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
build-and-publish-docs:
name: Generate and publish docs
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Triggered by
if: inputs.source_run != null
run: 'echo "Triggered by workflow in repo: ${{ inputs.source_run }}" >> $GITHUB_STEP_SUMMARY'
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5
with:
java-version: '21'
distribution: temurin
cache: gradle
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: true
fetch-depth: 0
- name: Generate and publish docs
env:
GH_TOKEN: ${{ github.token }}
run: ./gradlew check generateAndPublishDocs --refresh-dependencies
trigger-downstream-builds:
if: github.repository_owner == 'apple'
needs:
- build-and-publish-docs
runs-on: ubuntu-latest
steps:
- name: Create app token
id: app-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
with:
app-id: ${{ secrets.PKL_CI_CLIENT_ID }}
private-key: ${{ secrets.PKL_CI }}
owner: ${{ github.repository_owner }}
- name: Trigger pkl-lang.org build
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |-
gh workflow run \
--repo apple/pkl-lang.org \
--ref main \
--field source_run="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
main.yml