3333 permissions :
3434 contents : write
3535 id-token : write # This permission is required for trusted publishing
36- env :
37- PR_BRANCH_NAME : adjustments-release-${{ github.event.inputs.release-version }}
3836 steps :
3937 - name : Checkout the repository
4038 uses : actions/checkout@v4
@@ -52,35 +50,16 @@ jobs:
5250 run : poetry install --with docs
5351 - name : Create new documentation
5452 run : |
55- sphinx-apidoc -o docs/sphinx src/codeflare_sdk "**/*test_*" --force
56- make clean -C docs/sphinx
57- make html -C docs/sphinx
53+ gh workflow run publish-documentation.yaml \
54+ --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-sdk \
55+ --ref ${{ github.ref }} \
56+ --field codeflare_sdk_release_version=${{ github.event.inputs.release-version }}
5857 - name : Copy demo notebooks into SDK package
5958 run : cp -r demo-notebooks src/codeflare_sdk/demo-notebooks
6059 - name : Run poetry build
6160 run : poetry build
62- - name : Commit changes in docs
63- uses : stefanzweifel/git-auto-commit-action@v4
64- with :
65- file_pattern : ' docs'
66- commit_message : " Changes in docs for release: v${{ github.event.inputs.release-version }}"
67- create_branch : true
68- branch : ${{ env.PR_BRANCH_NAME }}
69- - name : Create a PR with code changes
70- run : |
71- if git branch -a | grep "${{ env.PR_BRANCH_NAME }}"; then
72- GIT_BRANCH=${GITHUB_REF#refs/heads/}
73- gh pr create --base "$GIT_BRANCH" --fill --head "${{ env.PR_BRANCH_NAME }}" --label "lgtm" --label "approved"
74- fi
7561 env :
7662 GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
77- - name : Wait until PR with code changes is merged
78- run : |
79- if git branch -a | grep "${{ env.PR_BRANCH_NAME }}"; then
80- timeout 3600 bash -c 'until [[ $(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state) == "MERGED" ]]; do sleep 5 && echo "$(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state)"; done'
81- fi
82- env :
83- GITHUB_TOKEN : ${{ github.TOKEN }}
8463 - name : Create Github release
8564 uses : ncipollo/release-action@v1
8665 with :
0 commit comments