Skip to content

Commit

Permalink
Allow publish workflow dispatch (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon authored Jan 8, 2025
1 parent 08a2c8f commit 96b1b13
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
push:
tags:
- v*
workflow_dispatch:
inputs:
projects:
description: 'Comma separated list of projects to test'
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -11,11 +16,17 @@ concurrency:
jobs:
build_matrix:
runs-on: ubuntu-latest
env:
PROJECTS: ${{ github.event.inputs.projects }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: |
echo "matrix=$(find * -type f -name build.yml | xargs dirname | sort | uniq | jq --raw-input . | jq -c --slurp .)" >> $GITHUB_OUTPUT
if [ -n "${{ env.PROJECTS }}" ]; then
echo "matrix=$(echo "${{ env.PROJECTS }}" | sed 's/, */,/g' | tr ',' '\n' | jq --raw-input . | jq -c --slurp .)" >> $GITHUB_OUTPUT
else
echo "matrix=$(find * -type f -name build.yml | xargs dirname | sort | uniq | jq --raw-input . | jq -c --slurp .)" >> $GITHUB_OUTPUT
fi
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
Expand Down

0 comments on commit 96b1b13

Please sign in to comment.