fix: sort by displayName prop #20
Workflow file for this run
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
name: Schedule (SGID Index Validation) | |
on: | |
schedule: | |
- cron: '0 0 * * 1-5' | |
workflow_dispatch: | |
issue_comment: | |
types: [created, edited] | |
push: | |
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_PRIVATE_KEY: ${{ secrets.SA }} | |
steps: | |
- name: ✅ Check comment | |
if: github.event_name == 'issue_comment' | |
run: | | |
if [[ "${{ github.event.comment.body }}" == "/validate-sgid-index" ]]; then | |
echo "Validating SGID Index" | |
else | |
echo "Skipping SGID Index validation" | |
exit 78 | |
fi | |
- 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: Validation Output | |
- name: ✍️ Updating issue comment | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ steps.create-issue.outputs.number }} | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
edit-mode: replace | |
body: | | |
### SGID Index Validation Output | |
#### Results | |
``` | |
${{ steps.validate.outputs.stdout }} | |
``` | |
#### Errors | |
${{ 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 }} |