-
Notifications
You must be signed in to change notification settings - Fork 9
35 lines (32 loc) · 1.11 KB
/
pull_request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Pull Request
on:
pull_request:
paths:
- 'services/**'
- 'bundestag.io/**'
- 'democracy/**'
branches:
- 'master'
jobs:
analyse-changed-services:
runs-on: ubuntu-latest
outputs:
CHANGED_PACKAGES: ${{ steps.changed-packages.outputs.CHANGED_PACKAGES }}
steps:
- name: Analyze changed services
run: |
pnpm list -r --json --filter "...[$SINCE]" --changed-files-ignore-pattern="**/(garden.yml|.dockerignore)" | jq '[.[] | select(.private == false) | {name, path}]' > ./tmp.json
CHANGED_PACKAGES=$(jq '[.[] | .name]' ./tmp.json)
echo CHANGED_PACKAGES=$CHANGED_PACKAGES >> $GITHUB_OUTPUT
echo CHANGED_PACKAGES=$CHANGED_PACKAGES
id: changed-packages
env:
SINCE: master
build-and-push:
uses: ./.github/workflows/build-and-push.yaml
needs: analyse-changed-services
with:
changedPackages: ${{fromJson(needs.analyse-changed-services.outputs.CHANGED_PACKAGES)}}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}