diff --git a/.github/workflows/actions_release.yml b/.github/workflows/actions_release.yml index 5e4c5af..1757ad3 100644 --- a/.github/workflows/actions_release.yml +++ b/.github/workflows/actions_release.yml @@ -7,9 +7,17 @@ on: description: "Tag for the release" required: true node_version: - description: "Node.js version to use" + description: "Node.js version to use for building actions" required: false default: "24" + working_directory: + description: "Comma-separated list of action directories to build" + required: false + default: "eval" + script: + description: "Build script to run in each action directory" + required: false + default: "npm run all" permissions: contents: read @@ -24,5 +32,7 @@ jobs: uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1 with: tag: "${{ github.event.inputs.tag }}" - node_version: ${{ inputs.node_version || '24' }} - working_directory: ./eval + node_version: "${{ github.event.inputs.node_version }}" + setup_node: true + working_directory: "${{ github.event.inputs.working_directory }}" + script: "${{ github.event.inputs.script }}" diff --git a/.github/workflows/audit_package.yml b/.github/workflows/audit_package.yml index 189fe4d..a888c53 100644 --- a/.github/workflows/audit_package.yml +++ b/.github/workflows/audit_package.yml @@ -15,20 +15,45 @@ on: description: "Node.js version to use" required: false default: "24" + working_directories: + description: "Comma-separated list of working directories to run audit fix in" + required: false + default: "eval" + script: + description: "Build script to run after audit fix" + required: false + default: "npm run all" schedule: - cron: "0 0 * * 1" +permissions: + contents: write + pull-requests: write + packages: read + issues: write + jobs: + prepare: + runs-on: ubuntu-latest + outputs: + directories: ${{ steps.set-matrix.outputs.directories }} + steps: + - name: Build directory matrix + id: set-matrix + run: | + INPUT="${{ inputs.working_directories || 'eval' }}" + DIRS=$(echo "$INPUT" | tr ',' '\n' | sed 's/^ *//;s/ *$//' | jq -R -s -c 'split("\n") | map(select(length > 0))') + echo "directories=$DIRS" >> "$GITHUB_OUTPUT" + audit-fix: + needs: prepare + strategy: + matrix: + directory: ${{ fromJson(needs.prepare.outputs.directories) }} uses: step-security/reusable-workflows/.github/workflows/audit_fix.yml@v1 with: force: ${{ inputs.force || false }} base_branch: ${{ inputs.base_branch || 'main' }} node_version: ${{ inputs.node_version || '24' }} - working_directory: ./eval - -permissions: - contents: write - pull-requests: write - packages: read - issues: write + working_directory: ${{ matrix.directory }} + script: ${{ inputs.script || 'npm run all' }}