|
| 1 | +# This file was auto-generated by github-actions-workflow-generator 0.0.5. Do not edit. |
| 2 | +# To update it, modify .github/workflow-generator.yml as needed and re-run the generator. |
| 3 | + |
| 4 | +name: "Release Train – Build" |
| 5 | +run-name: "${{ inputs.callback-ref }} – Build" |
| 6 | +"on": |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + callback: |
| 10 | + description: "Repository to which a callback should be made upon completion" |
| 11 | + required: true |
| 12 | + type: "string" |
| 13 | + callback-ref: |
| 14 | + description: "Ref in the callback repository to which a callback should be made upon completion" |
| 15 | + required: true |
| 16 | + type: "string" |
| 17 | + release-train-maven-repository-url: |
| 18 | + description: "URL of a Maven repository to be used to resolve artifacts of projects earlier in the train" |
| 19 | + required: true |
| 20 | + type: "string" |
| 21 | +permissions: |
| 22 | + contents: "read" |
| 23 | +concurrency: |
| 24 | + group: "${{ github.workflow }}-${{ github.ref }}" |
| 25 | +jobs: |
| 26 | + build-release: |
| 27 | + name: "Build Release" |
| 28 | + runs-on: "ubuntu22-2-8" |
| 29 | + steps: |
| 30 | + - name: "Set up Java" |
| 31 | + id: "set-up-java" |
| 32 | + uses: "actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520" # 5.4.0 |
| 33 | + with: |
| 34 | + distribution: "liberica" |
| 35 | + java-version: "17" |
| 36 | + - name: "Check Out Code" |
| 37 | + id: "check-out-code" |
| 38 | + uses: "actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0" # 7.0.0 |
| 39 | + with: |
| 40 | + ref: "${{ github.ref }}" |
| 41 | + - name: "Build Release" |
| 42 | + id: "build-release" |
| 43 | + uses: "./.github/actions/release-train-build" |
| 44 | + env: |
| 45 | + COMMERCIAL_REPO_PASSWORD: "${{ secrets.COMMERCIAL_ARTIFACTORY_PASSWORD }}" |
| 46 | + COMMERCIAL_REPO_USERNAME: "${{ secrets.COMMERCIAL_ARTIFACTORY_USERNAME }}" |
| 47 | + RELEASE_TRAIN_MAVEN_REPOSITORY_PASSWORD: "${{ secrets.RELEASE_TRAIN_PARTICIPANT_MAVEN_REPOSITORY_PASSWORD }}" |
| 48 | + RELEASE_TRAIN_MAVEN_REPOSITORY_URL: "${{ inputs.release-train-maven-repository-url }}" |
| 49 | + RELEASE_TRAIN_MAVEN_REPOSITORY_USERNAME: "${{ secrets.RELEASE_TRAIN_PARTICIPANT_MAVEN_REPOSITORY_USERNAME }}" |
| 50 | + - name: "Upload Deployment Repository" |
| 51 | + id: "upload-deployment-repository" |
| 52 | + uses: "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a" # 7.0.1 |
| 53 | + with: |
| 54 | + name: "deployment-repository" |
| 55 | + path: "deployment-repository/**" |
| 56 | + - name: "Upload Deployment Spec" |
| 57 | + id: "upload-deployment-spec" |
| 58 | + uses: "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a" # 7.0.1 |
| 59 | + with: |
| 60 | + archive: "false" |
| 61 | + if-no-files-found: "ignore" |
| 62 | + name: "deployment-spec" |
| 63 | + path: ".github/actions/release-train-build/deployment-spec.yml" |
| 64 | + - name: "Save Build System Caches" |
| 65 | + id: "save-build-system-caches" |
| 66 | + uses: "actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9" # 6.1.0 |
| 67 | + with: |
| 68 | + key: "release-train-${{ inputs.callback-ref }}-${{ github.ref_name }}" |
| 69 | + path: "~/.m2/repository" |
| 70 | + - name: "Send Callback" |
| 71 | + id: "send-callback" |
| 72 | + if: "${{ !cancelled() }}" |
| 73 | + env: |
| 74 | + GH_TOKEN: "${{ secrets.RELEASE_TRAIN_PARTICIPANT_GITHUB_TOKEN }}" |
| 75 | + run: |- |
| 76 | + gh workflow run callback \ |
| 77 | + --repo ${{ inputs.callback }} \ |
| 78 | + --ref ${{ inputs.callback-ref }} \ |
| 79 | + --field commit-hash=${{ steps.check-out-code.outputs.commit }} \ |
| 80 | + --field deployment-repository-artifact-identifier=${{ steps.upload-deployment-repository.outputs.artifact-id }} \ |
| 81 | + --field deployment-spec-artifact-identifier=${{ steps.upload-deployment-spec.outputs.artifact-id }} \ |
| 82 | + --field release-branch=${{ github.ref_name }} \ |
| 83 | + --field release-repository=${{ github.repository }} \ |
| 84 | + --field result=${{ job.status == 'success' && 'built' || 'build-failed' }} \ |
| 85 | + --field workflow-run-url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
0 commit comments