-
Notifications
You must be signed in to change notification settings - Fork 41
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
Showing
8 changed files
with
814 additions
and
3 deletions.
There are no files selected for viewing
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,7 @@ | ||
--- | ||
title: SGID Index Validation Issues | ||
--- | ||
|
||
Validation errors have been detected in the [SGID Index](https://docs.google.com/spreadsheets/d/11ASS7LnxgpnD0jN4utzklREgMf1pcvYjcXcIcESHweQ/edit#gid=1024261148). This issue will be used to track the resolution of these issues. | ||
|
||
GitHub Actions should post a comment with the details shortly... |
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,93 @@ | ||
name: Schedule (SGID Index Validation) | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 1-5' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
validate: | ||
name: Validate SGID Index | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./src/scripts | ||
env: | ||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.SA }} | ||
|
||
steps: | ||
- name: ⬇️ Set up code | ||
uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
|
||
- name: ⎔ Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
|
||
- name: 📦 Install script dependencies | ||
run: npm install | ||
|
||
- name: ✔ Running script | ||
uses: gh640/command-result-action@v1 | ||
id: validate | ||
with: | ||
command: node validate-sgid-index.mjs | ||
cwd: ./src/scripts | ||
|
||
- name: 📝 Create issue | ||
id: create-issue | ||
if: steps.validate.outputs.exitCode != 0 | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
filename: .github/SGID_INDEX_ISSUE_TEMPLATE.md | ||
update_existing: true | ||
|
||
- name: Find Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: find-comment | ||
with: | ||
issue-number: ${{ steps.create-issue.outputs.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: output | ||
|
||
- name: ✍️ Updating issue comment | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{ steps.create-issue.outputs.number }} | ||
comment-id: validation-output | ||
body: | | ||
### SGID Index Validation Output | ||
#### `stdout` | ||
``` | ||
${{ steps.validate.outputs.stdout }} | ||
``` | ||
#### `stderr` | ||
``` | ||
${{ steps.validate.outputs.stderr }} | ||
``` | ||
- name: 🚦 Check for errors | ||
if: steps.validate.outputs.exitCode != 0 | ||
run: | | ||
echo "::error::Validate stderr${{ steps.validate.outputs.stderr }}" | ||
exit ${{ steps.validate.outputs.exitCode }} | ||
- name: 🎉 Close issue | ||
if: steps.validate.outputs.exitCode == 0 && steps.create-issue.outputs.number | ||
run: gh issue close --comment "Auto-closing issue" "${{ steps.create-issue.outputs.number }}" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -260,6 +260,7 @@ | |
"oil", | ||
"oiland", | ||
"opendata", | ||
"opensgid", | ||
"Oquirrh", | ||
"Orangeville", | ||
"Orderville", | ||
|
Oops, something went wrong.