fix: only run packer validation if any packer-related files were changed.

These files rarely change - and usually by me - so it shouldn't impact PRs from other collaborators very often.
This commit is contained in:
josegonzalez
2023-05-12 23:40:19 -04:00
committed by GitHub
parent 1cfaa6c942
commit 1535549a8f

View File

@@ -46,9 +46,15 @@ jobs:
version: latest
- name: Run packer init
run: "make image/init/digitalocean"
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v35.9.2
with:
files: contrib/images/digitalocean/**
- name: Run `packer validate`
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: "make image/validate/digitalocean"
shellcheck: