Skip to content

[Submit add-on]: Speech Logger version 23.2.01 #458

[Submit add-on]: Speech Logger version 23.2.01

[Submit add-on]: Speech Logger version 23.2.01 #458

Workflow file for this run

name: Send json file
on:
issues:
types:
- labeled
jobs:
check-addon:
outputs:
pullRequestNumber: ${{ steps.cpr.outputs.pull-request-number }}
headRef: ${{ steps.cpr.outputs.pull-request-head-sha }}
permissions:
contents: write
issues: write
pull-requests: write
name: Check add-on
if: github.event.label.name == 'autoSubmissionFromIssue'
runs-on: windows-latest
steps:
- name: Checkout datastore repo
uses: actions/checkout@v3
with:
ref: master
path: datastore
- name: Get data
id: get-data
uses: actions/github-script@v6
with:
script: |
const setOutputFromIssue = require('./datastore/.github/workflows/getData.js')
setOutputFromIssue({context, core})
- name: Checkout validate repo
uses: actions/checkout@v3
with:
repository: nvaccess/addon-datastore-validation
submodules: true
path: validation
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Create validation errors file
run: echo "" > validationErrors.md
- name: Download add-on
# wrap all user input in quotations to prevent RCE e.g. www.example.com/&rm -rf
run: curl --location --output addon.nvda-addon "${{ steps.get-data.outputs.downloadUrl }}"
- name: Create JSON submission from issue
# wrap all user input in quotations to prevent RCE e.g. www.example.com/&rm -rf
run: |
validation/runcreatejson `
-f addon.nvda-addon `
--dir datastore\addons `
--output .\validationErrors.md `
--channel='"${{ steps.get-data.outputs.releaseChannel }}"' `
--publisher='"${{ steps.get-data.outputs.publisher }}"' `
--sourceUrl='"${{ steps.get-data.outputs.sourceUrl }}"' `
--url='"${{ steps.get-data.outputs.downloadUrl }}"' `
--licName='"${{ steps.get-data.outputs.licenseName }}"' `
--licUrl='"${{ steps.get-data.outputs.licenseURL }}"'
- name: Post validation errors as comment
if: failure()
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body-file: ./validationErrors.md
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
path: datastore
title: ${{ steps.get-data.outputs.issueTitle }}
branch: ${{ github.event.sender.login }}${{ steps.get-data.outputs.issueNumber }}
commit-message: ${{ steps.get-data.outputs.issueTitle }}
body: "Closes #${{ steps.get-data.outputs.issueNumber }}"
author: github-actions <github-actions@github.com>
call-workflow-passing-data:
needs: check-addon
uses: ./.github/workflows/checkAndSubmitAddonMetadata.yml
with:
pullRequestNumber: ${{ needs.check-addon.outputs.pullRequestNumber }}
headRef: ${{ needs.check-addon.outputs.headRef }}