CCM-14499: Pinning all GitHub Actions to SHAs #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Build stage" | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| build_datetime: | ||
| description: "Build datetime, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| build_timestamp: | ||
| description: "Build timestamp, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| build_epoch: | ||
| description: "Build epoch, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| nodejs_version: | ||
| description: "Node.js version, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| python_version: | ||
| description: "Python version, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| terraform_version: | ||
| description: "Terraform version, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| version: | ||
| description: "Version of the software, set by the CI/CD pipeline workflow" | ||
| required: true | ||
| type: string | ||
| jobs: | ||
| detect-doc-changes: | ||
| name: "Detect Documentation Changes" | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| outputs: | ||
| docs_changed: ${{ steps.filter.outputs.docs }} | ||
| schemas_changed: ${{ steps.filter.outputs.schemas }} | ||
| eventcatalog_changed: ${{ steps.filter.outputs.eventcatalog }} | ||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||
| - name: "Check for relevant changes" | ||
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 id: filter | ||
| with: | ||
| filters: | | ||
| docs: | ||
| - 'docs/**' | ||
| schemas: | ||
| - 'src/cloudevents/**' | ||
| - 'src/cloudeventjekylldocs/**' | ||
| eventcatalog: | ||
| - 'src/eventcatalog/**' | ||
| - 'src/asyncapigenerator/**' | ||
| - 'src/eventcatalogasyncapiimporter/**' | ||
| artefact-jekyll-docs: | ||
| name: "Build Docs" | ||
| needs: [detect-doc-changes] | ||
| if: | | ||
| needs.detect-doc-changes.outputs.docs_changed == 'true' || | ||
| needs.detect-doc-changes.outputs.schemas_changed == 'true' || | ||
| needs.detect-doc-changes.outputs.eventcatalog_changed == 'true' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: "Build docs" | ||
| uses: ./.github/actions/build-docs | ||
| with: | ||
| version: "${{ inputs.version }}" | ||
| node-version: ${{ inputs.nodejs_version }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||