pantry/.github/workflows/new-version.yml

41 lines
891 B
YAML
Raw Normal View History

name: new-version
2023-03-16 15:33:53 +03:00
run-name: building ${{ inputs.projects }}
2023-04-09 15:26:48 +03:00
on:
2023-12-13 13:42:25 +03:00
workflow_call:
inputs:
projects:
description: eg. `foo.com=1.2.3 bar.com^2.3.4`
required: true
type: string
workflow_dispatch:
inputs:
projects:
description: eg. `foo.com=1.2.3 bar.com^2.3.4`
required: true
type: string
jobs:
2023-12-13 19:47:32 +03:00
ingest:
2023-12-13 13:42:25 +03:00
runs-on: ubuntu-latest
outputs:
pkgs: ${{ steps.divide.outputs.pkgs }}
steps:
- run: |
2023-12-13 13:49:06 +03:00
var="$(echo ${{ inputs.projects }} | jq -R -s -c 'split(" ")')"
2023-12-13 13:42:25 +03:00
echo "pkgs=$var" >> $GITHUB_OUTPUT
id: divide
2023-12-13 19:47:32 +03:00
pkg:
needs: ingest
2023-04-09 15:26:48 +03:00
strategy:
2023-12-13 19:47:32 +03:00
fail-fast: false
2023-04-09 15:26:48 +03:00
matrix:
2023-12-13 19:47:32 +03:00
pkg: ${{ fromJSON(needs.ingest.outputs.pkgs) }}
2023-12-13 13:42:25 +03:00
uses: ./.github/workflows/pkg.yml
2023-12-13 19:47:32 +03:00
permissions:
issues: write
with:
2023-12-13 13:42:25 +03:00
pkg: ${{ matrix.pkg }}
secrets: inherit