Skip to content

Commit

Permalink
ci: 👷 only build since last master instead of last tag
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck authored and ManAnRuck committed Sep 22, 2024
1 parent e10d55c commit 7990b30
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,25 @@ on:

jobs:
analyse-changed-services:
uses: ./.github/workflows/get-changed-services.yaml
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: ${{ needs.analyse-changed-services.outputs.CHANGED_PACKAGES }}
changedPackages: ${{fromJson(needs.analyse-changed-services.outputs.CHANGED_PACKAGES)}}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

0 comments on commit 7990b30

Please sign in to comment.