Skip to content

Fix fork workflows #1377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,11 @@ jobs:
echo "Array API standard conformance tests failed to run for dpctl=$PACKAGE_VERSION."
exit 1
fi
- name: Output API summary
shell: bash -l {0}
run: echo "::notice ${{ env.MESSAGE }}"
- name: Post result to PR
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork }}
uses: mshick/add-pr-comment@v1
with:
message: |
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
mv ../cmake-install/docs/docs ~/docs
git clean -dfx
- name: Publish docs
if: ${{ github.ref == 'refs/heads/master' }}
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.ref == 'refs/heads/master' }}
shell: bash -l {0}
run: |
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpctl.git
Expand All @@ -91,8 +91,15 @@ jobs:
git config --global user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com'
git commit -m "Latest docs."
git push tokened_docs gh-pages
- name: Save built docs as an artifact
if: ${{ github.event.pull_request && github.event.pull_request.head.repo.fork && github.event.action != 'closed'}}
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }} rendered documentation
path: ~/docs

- name: Publish pull-request docs
if: ${{ github.event.pull_request && github.event.action != 'closed' }}
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' }}
env:
PR_NUM: ${{ github.event.number }}
shell: bash -l {0}
Expand All @@ -111,7 +118,7 @@ jobs:
git commit -m "Docs for pull request ${PR_NUM}"
git push tokened_docs gh-pages
- name: Unpublish pull-request docs
if: ${{ github.event.pull_request && github.event.action == 'closed' }}
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed' }}
env:
PR_NUM: ${{ github.event.number }}
shell: bash -l {0}
Expand All @@ -128,7 +135,7 @@ jobs:
git commit -m "Removing docs for closed pull request ${PR_NUM}"
git push tokened_docs gh-pages
- name: Comment with URL to published pull-request docs
if: ${{ github.event.pull_request && github.event.action != 'closed' }}
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' }}
env:
PR_NUM: ${{ github.event.number }}
uses: mshick/add-pr-comment@v1
Expand All @@ -138,7 +145,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
- name: Comment with URL about removal of PR docs
if: ${{ github.event.pull_request && github.event.action == 'closed' }}
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed' }}
env:
PR_NUM: ${{ github.event.number }}
uses: mshick/add-pr-comment@v1
Expand Down