pantry/.github/workflows/cd.yml
2023-12-13 05:42:25 -05:00

40 lines
930 B
YAML

name: cd
run-name: 'cd: ${{ github.event.head_commit.message }}'
on:
push:
branches: main
paths: projects/**/*
concurrency:
group: cd/${{ github.ref }}
cancel-in-progress: true
jobs:
get-projects:
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.diff.outputs.diff }}
steps:
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
id: get-diff
with:
PATTERNS: projects/**/package.yml
- id: diff
run: |
for x in ${{ steps.get-diff.outputs.diff }}; do
y=$(echo $x | sed 's#projects/\(.*\)/package.yml#\1#')
RESULT="$RESULT $y"
done
echo "diff=$RESULT" >> $GITHUB_OUTPUT
pkgit:
strategy:
fail-fast: false
needs: get-projects
uses: ./.github/workflows/new-version.yml
with:
projects: ${{ needs.get-projects.outputs.diff }}
secrets: inherit