removing import of something just to get the http error code forbidden #405
Workflow file for this run
This file contains 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
# | |
# Copyright contributors to the Galasa project | |
# | |
# SPDX-License-Identifier: EPL-2.0 | |
# | |
name: Pull Request Build Orchestrator | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
detect-secrets: | |
name: Detect secrets | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Turn script into an executable | |
working-directory: ./tools | |
run: chmod +x detect-secrets.sh | |
- name: Run the detect secrets script | |
working-directory: ./tools | |
run: ./detect-secrets.sh | |
# Get modules that were changed as part of this Pull Request, | |
# set that as an output of this job to be passed to the next job. | |
get-changed-modules: | |
name: Get the modules changed in this Pull Request | |
runs-on: ubuntu-latest | |
outputs: | |
platform_changed: ${{ steps.get-changed-modules.outputs.PLATFORM_CHANGED }} | |
buildutils_changed: ${{ steps.get-changed-modules.outputs.BUILDUTILS_CHANGED }} | |
wrapping_changed: ${{ steps.get-changed-modules.outputs.WRAPPING_CHANGED }} | |
gradle_changed: ${{ steps.get-changed-modules.outputs.GRADLE_CHANGED }} | |
maven_changed: ${{ steps.get-changed-modules.outputs.MAVEN_CHANGED }} | |
framework_changed: ${{ steps.get-changed-modules.outputs.FRAMEWORK_CHANGED }} | |
extensions_changed: ${{ steps.get-changed-modules.outputs.EXTENSIONS_CHANGED }} | |
managers_changed: ${{ steps.get-changed-modules.outputs.MANAGERS_CHANGED }} | |
obr_changed: ${{ steps.get-changed-modules.outputs.OBR_CHANGED }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github/scripts | |
- name: Get the modules changed in this Pull Request | |
id: get-changed-modules | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
./.github/scripts/get-changed-modules-pull-request.sh --github-repo ${{ github.event.pull_request.head.repo.full_name }} --pr-number ${{ github.event.number }} | |
find-artifacts: | |
name: Get Workflow Run ID to download artifacts from | |
runs-on: ubuntu-latest | |
outputs: | |
workflow_for_artifact_download_id: ${{ steps.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
steps: | |
- name: Get last successful workflow run of the "Main Build Orchestrator" for PR's base ref | |
id: find-artifacts | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
echo "workflow_for_artifact_download_id=$(gh run list \ | |
--repo ${{ github.repository }} \ | |
--workflow 'Main Build Orchestrator' \ | |
--branch ${{ github.base_ref }} \ | |
--status success \ | |
--limit 1 \ | |
--json databaseId | jq '.[0].databaseId')" >> $GITHUB_OUTPUT | |
pr-build-platform: | |
name: Build the 'platform' module | |
needs: [get-changed-modules, find-artifacts] | |
uses: ./.github/workflows/pr-platform.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.platform_changed }} | |
pr-build-buildutils: | |
name: Build the 'buildutils' module | |
needs: [get-changed-modules, find-artifacts] | |
uses: ./.github/workflows/pr-buildutils.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.buildutils_changed }} | |
pr-build-wrapping: | |
name: Build the 'wrapping' module | |
needs: [get-changed-modules, find-artifacts, pr-build-platform] | |
uses: ./.github/workflows/pr-wrapping.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.wrapping_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
pr-build-gradle: | |
name: Build the 'gradle' module | |
needs: [get-changed-modules, find-artifacts, pr-build-platform] | |
uses: ./.github/workflows/pr-gradle.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.gradle_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
pr-build-maven: | |
name: Build the 'maven' module | |
needs: [get-changed-modules, find-artifacts, pr-build-gradle] | |
uses: ./.github/workflows/pr-maven.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.maven_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
pr-build-framework: | |
name: Build the 'framework' module | |
needs: [get-changed-modules, find-artifacts, pr-build-buildutils, pr-build-wrapping, pr-build-maven] | |
uses: ./.github/workflows/pr-framework.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.framework_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
pr-build-extensions: | |
name: Build the 'extensions' module | |
needs: [get-changed-modules, find-artifacts, pr-build-framework] | |
uses: ./.github/workflows/pr-extensions.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.extensions_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
pr-build-managers: | |
name: Build the 'managers' module | |
needs: [get-changed-modules, find-artifacts, pr-build-framework] | |
uses: ./.github/workflows/pr-managers.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.managers_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
pr-build-obr: | |
name: Build the 'obr' module | |
needs: [get-changed-modules, find-artifacts, pr-build-extensions, pr-build-managers] | |
uses: ./.github/workflows/pr-obr.yaml | |
secrets: inherit | |
with: | |
changed: ${{ needs.get-changed-modules.outputs.obr_changed }} | |
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }} | |
# This is required as all previous jobs are optional based on if a module has changed. | |
# This job is set in the branch protection rules as required to merge a Pull Request. | |
end-pull-request-build: | |
name: Pull Request build was successful | |
needs: [pr-build-obr, detect-secrets] | |
runs-on: ubuntu-latest | |
steps: | |
- name: End of Pull Request build | |
run: | | |
echo "Pull Request build was successful" |