Skip to content

Order ID validation

Order ID validation #1

name: Order ID validation
on:
issues:
types:
- opened
workflow_call:
inputs:
orderId:
required: true
type: string
permissions: {}
jobs:
order_validation:
name: Validate order ID
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Check out mui-public repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
# Check this repository out, otherwise the script won't be available,
# as it otherwise checks out the repository where the workflow caller is located
repository: mui/mui-public
- name: Validate order ID
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const script = require('./.github/workflows/scripts/issues/orderIdValidation.js')
await script({core, github, context})
env:
ORDER_ID: ${{ inputs.orderId }}
ORDER_API_TOKEN: ${{ secrets.SHOP_AUTH_TOKEN }}