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

53 lines
1.1 KiB
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 13:42:25 +03:00
divide:
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 13:42:25 +03:00
pkgit:
needs: divide
2023-04-09 15:26:48 +03:00
strategy:
matrix:
2023-12-13 13:42:25 +03:00
pkg: ${{ fromJSON(needs.divide.outputs.pkgs) }}
uses: ./.github/workflows/pkg.yml
with:
2023-12-13 13:42:25 +03:00
pkg: ${{ matrix.pkg }}
secrets: inherit
2023-04-09 15:26:48 +03:00
complain:
2023-12-13 13:42:25 +03:00
needs: pkgit
2023-04-09 15:26:48 +03:00
if: failure()
runs-on: ubuntu-latest
2023-12-13 13:42:25 +03:00
strategy:
fail-fast: false
2023-12-13 13:49:06 +03:00
permissions:
issues: write
2023-04-09 15:26:48 +03:00
steps:
2023-12-13 13:42:25 +03:00
- uses: actions/checkout@v4
- uses: ./.github/actions/complain
2023-04-09 15:26:48 +03:00
with:
pkg: ${{ inputs.pkg }}
2023-12-13 13:42:25 +03:00
platform: ${{ inputs.name }}