thousands-plumber-33255
06/20/2023, 1:20 PM--changed-since
in a GitHub Actions workflow to know if anything in Django has changed and use that to run subsequent steps conditionally. How can this be achieved best with pants --changed-since=HEAD django::
?thousands-plumber-33255
06/20/2023, 2:14 PM- name: Create list of changed docker images
id: changed-since
run: |
pants --changed-since=HEAD --filter-target-type=docker_image list > changed_since.txt
- name: Check for Changes in Django
id: django-changed
run: |
grep -q "django" changed_since.txt && echo "any-changed=true" >> $GITHUB_OUTPUT || echo "any-changed=false" >> $GITHUB_OUTPUT
- name: Conditional step
if: steps.django-changed.outputs.any-changed == 'true'
Better ideas?gorgeous-winter-99296
06/20/2023, 2:48 PM--changed-dependees=transitive
and --filter-address-regex='^django'
help you here?thousands-plumber-33255
06/20/2023, 3:08 PMgorgeous-winter-99296
06/20/2023, 3:09 PMgorgeous-winter-99296
06/20/2023, 3:27 PMpants --changed-since=HEAD --filter-target-type=docker_image --filter-address-regex='^django/.*' --changed-dependees=transitive
should list: all docker images, where the address starts with django/
, which have changed, or whose dependencies have changed, since the last commit.