-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2103dd8
commit 7623862
Showing
7 changed files
with
143 additions
and
142 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# This is a separate workflow due to permission issues. | ||
|
||
name: 'Package: Report results' | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['Package: Lint'] | ||
types: [completed] | ||
|
||
# Disable all permissions | ||
permissions: {} | ||
|
||
jobs: | ||
report_results: | ||
name: Check results | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
pull-requests: write | ||
contents: read # Only needed for private repository | ||
issues: read # Only needed for private repository | ||
|
||
if: github.event.workflow_run.conclusion != 'skipped' | ||
|
||
steps: | ||
- id: extract_lint_results | ||
name: Download and extract artifacts | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
run: | | ||
mkdir -p artifacts && cd artifacts | ||
artifacts_url=${{ github.event.workflow_run.artifacts_url }} | ||
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact | ||
do | ||
IFS=$'\t' read name url <<< "$artifact" | ||
gh api "$url" > "$name.zip" | ||
unzip -d "$name" "$name.zip" | ||
done | ||
echo "issue-number=$(cat 'lint-results/issue-number.txt')" >> $GITHUB_OUTPUT | ||
delimiter="$(openssl rand -hex 16)" | ||
echo "content<<${delimiter}" >> "${GITHUB_OUTPUT}" | ||
cat 'lint-results/lint-report.md' >> "${GITHUB_OUTPUT}" | ||
echo "${delimiter}" >> "${GITHUB_OUTPUT}" | ||
- id: find_comment | ||
name: Find lint results comment | ||
uses: peter-evans/find-comment@v3 | ||
with: | ||
issue-number: ${{ steps.extract_lint_results.outputs.issue-number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: 'Check Result' | ||
|
||
- name: Report lint results | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
comment-id: ${{ steps.find_comment.outputs.comment-id }} | ||
issue-number: ${{ steps.extract_lint_results.outputs.issue-number }} | ||
body: ${{ steps.extract_lint_results.outputs.content }} | ||
edit-mode: replace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: 'Site: Deploy' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
# Run at 41 minutes past every 3rd hour | ||
- cron: 41 */3 * * * | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
generate: | ||
uses: ./.github/workflows/site-generate.yml | ||
|
||
deploy: | ||
needs: generate | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Site: Lint' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'packages/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
generate: | ||
uses: ./.github/workflows/site-generate.yml |
This file was deleted.
Oops, something went wrong.