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

48 lines
1.1 KiB
YAML
Raw Normal View History

2023-12-29 11:24:37 +03:00
name: build pkg 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
2024-01-02 18:10:36 +03:00
complain:
type: boolean
default: false
workflow_dispatch:
inputs:
projects:
description: eg. `foo.com=1.2.3 bar.com^2.3.4`
required: true
type: string
2023-12-30 10:57:09 +03:00
complain:
type: boolean
default: true
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: |
2024-01-02 00:30:31 +03:00
var="$(echo -n ${{ 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 }}
2023-12-30 10:57:09 +03:00
complain: ${{ github.event_name == 'workflow_call' || inputs.complain }}
secrets: inherit