pantry/.github/workflows/cd.yml

40 lines
930 B
YAML
Raw Normal View History

name: cd
2023-03-16 15:33:53 +03:00
run-name: 'cd: ${{ github.event.head_commit.message }}'
on:
push:
2023-12-13 13:42:25 +03:00
branches: main
paths: projects/**/*
concurrency:
group: cd/${{ github.ref }}
cancel-in-progress: true
jobs:
2023-12-13 13:42:25 +03:00
get-projects:
runs-on: ubuntu-latest
2023-01-06 03:19:09 +03:00
outputs:
2023-12-13 13:42:25 +03:00
projects: ${{ steps.diff.outputs.diff }}
steps:
2023-09-30 19:15:42 +03:00
- uses: actions/checkout@v4
2023-01-06 02:32:56 +03:00
- uses: technote-space/get-diff-action@v6
2023-02-13 17:28:03 +03:00
id: get-diff
2023-01-06 02:32:56 +03:00
with:
PATTERNS: projects/**/package.yml
2023-02-13 17:28:03 +03:00
- 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
2023-02-13 17:28:03 +03:00
echo "diff=$RESULT" >> $GITHUB_OUTPUT
2023-12-13 13:42:25 +03:00
pkgit:
strategy:
fail-fast: false
needs: get-projects
uses: ./.github/workflows/new-version.yml
with:
projects: ${{ needs.get-projects.outputs.diff }}
secrets: inherit