Skip to content

Commit

Permalink
feat: store files in fork repo
Browse files Browse the repository at this point in the history
Signed-off-by: zhy76 <[email protected]>
  • Loading branch information
zhy76 committed Sep 5, 2023
1 parent 36785be commit 70e05ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,32 @@ jobs:
with:
name: ${{ steps.visualisation.outputs.visualisation-results-artifact }}
path: images
# Checkout to fork repo
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}
# Store the latest summary report file
- name: Store the latest summary report file
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.PERSONAL_TOKEN }}
external_repository: ${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}
publish_dir: ./summary_reports
keep_files: true
# Store the visualisation results
- name: Store the visualisation results
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.PERSONAL_TOKEN }}
external_repository: ${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}
publish_dir: ./images
keep_files: true
# Comment the visualisation results on the PR
- name: Comment on PR
run: |
gh pr comment ${{ github.event.number }} -b"![system_graph](https://raw.githubusercontent.com/${{ github.repository }}/gh-pages/${{ steps.visualisation.outputs.sys-visualisation-image }})"
gh pr comment ${{ github.event.number }} -b"![network_graph](https://raw.githubusercontent.com/${{ github.repository }}/gh-pages/${{ steps.visualisation.outputs.network-visualisation-image }})"
gh pr comment ${{ github.event.number }} -b"![system_graph](https://raw.githubusercontent.com/${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}/gh-pages/${{ steps.visualisation.outputs.sys-visualisation-image }})"
gh pr comment ${{ github.event.number }} -b"![network_graph](https://raw.githubusercontent.com/${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}/gh-pages/${{ steps.visualisation.outputs.network-visualisation-image }})"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Delete the new app
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,27 @@ jobs:
with:
name: ${{ steps.visualisation.outputs.visualisation-results-artifact }}
path: images
# Store the latest summary report file
# Store the latest summary report file
- name: Store the latest summary report file
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.PERSONAL_TOKEN }}
external_repository: ${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}
publish_dir: ./summary_reports
keep_files: true
# Store the visualisation results
- name: Store the visualisation results
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.PERSONAL_TOKEN }}
external_repository: ${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}
publish_dir: ./images
keep_files: true
# Comment the visualisation results on the PR
- name: Comment on PR
run: |
gh pr comment ${{ github.event.number }} -b"![system_graph](https://raw.githubusercontent.com/${{ github.repository }}/gh-pages/${{ steps.visualisation.outputs.sys-visualisation-image }})"
gh pr comment ${{ github.event.number }} -b"![network_graph](https://raw.githubusercontent.com/${{ github.repository }}/gh-pages/${{ steps.visualisation.outputs.network-visualisation-image }})"
gh pr comment ${{ github.event.number }} -b"![system_graph](https://raw.githubusercontent.com/${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}/gh-pages/${{ steps.visualisation.outputs.sys-visualisation-image }})"
gh pr comment ${{ github.event.number }} -b"![network_graph](https://raw.githubusercontent.com/${{ github.event.pull_request.user.login }}/${{ github.event.repository.full_name }}/gh-pages/${{ steps.visualisation.outputs.network-visualisation-image }})"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Delete the new app
Expand Down

0 comments on commit 70e05ed

Please sign in to comment.