|
31 | 31 | MACHINE_ID: noaacloud
|
32 | 32 |
|
33 | 33 | jobs:
|
| 34 | + |
| 35 | + run-start-clusters: |
| 36 | + runs-on: ubuntu-latest |
| 37 | + env: |
| 38 | + PW_PLATFORM_HOST: noaa.parallel.works |
| 39 | + steps: |
| 40 | + - name: Checkout pw-cluster-automation repository |
| 41 | + uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + repository: TerrenceMcGuinness-NOAA/pw-cluster-automation |
| 44 | + path: pw-cluster-automation |
| 45 | + ref: pw_cluster_noaa |
| 46 | + |
| 47 | + - name: Run startClusters |
| 48 | + run: | |
| 49 | + mkdir -p ~/.ssh |
| 50 | + echo "${{ secrets.ID_RSA_AWS }}" > ~/.ssh/id_rsa |
| 51 | + echo "${{ secrets.PW_API_KEY }}" > ~/.ssh/pw_api.key |
| 52 | + chmod 700 ~/.ssh |
| 53 | + chmod 600 ~/.ssh/id_rsa |
| 54 | + chmod 600 ~/.ssh/pw_api.key |
| 55 | + if [ "${{ github.event.inputs.os }}" == "rocky" ]; then |
| 56 | + clustername="globalworkflowciplatformrocky8" |
| 57 | + elif [ "${{ github.event.inputs.os }}" == "centos" ]; then |
| 58 | + clustername="awsemctmcgc7i48xlargeciplatform" |
| 59 | + fi |
| 60 | + python3 pw-cluster-automation/startClusters.py $clustername |
| 61 | +
|
34 | 62 | fetch-branch:
|
| 63 | + needs: run-start-clusters |
35 | 64 | runs-on: ubuntu-latest
|
36 | 65 | env:
|
37 | 66 | GH_TOKEN: ${{ secrets.GITHUBTOKEN }}
|
38 | 67 | outputs:
|
39 | 68 | branch: ${{ steps.get-branch.outputs.branch }}
|
| 69 | + repo: ${{ steps.get-branch.outputs.repo }} |
40 | 70 | steps:
|
41 |
| - - name: Fetch branch name for PR |
| 71 | + - name: Fetch branch name and repo for PR |
42 | 72 | id: get-branch
|
43 | 73 | run: |
|
44 | 74 | pr_number=${{ github.event.inputs.pr_number }}
|
45 | 75 | repo=${{ github.repository }}
|
46 | 76 | if [ "$pr_number" -eq "0" ]; then
|
47 | 77 | branch=${{ github.event.inputs.ref }}
|
| 78 | + repo_url="https://github.com/${{ github.repository_owner }}/${{ github.repository }}.git" |
48 | 79 | else
|
49 | 80 | branch=$(gh pr view $pr_number --repo $repo --json headRefName --jq '.headRefName')
|
| 81 | + repo_url=$(gh pr view $pr_number --repo $repo --json headRepository --jq '.headRepository.url') |
50 | 82 | fi
|
51 | 83 | echo "::set-output name=branch::$branch"
|
| 84 | + echo "::set-output name=repo::$repo_url" |
52 | 85 |
|
53 | 86 | checkout:
|
54 | 87 | needs: fetch-branch
|
|
64 | 97 | with:
|
65 | 98 | path: ${{ github.run_id }}/HOMEgfs
|
66 | 99 | submodules: 'recursive'
|
| 100 | + repository: ${{ needs.fetch-branch.outputs.repo }} |
67 | 101 | ref: ${{ needs.fetch-branch.outputs.branch }}
|
68 | 102 |
|
69 | 103 | build-link:
|
|
0 commit comments