2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Added check for Ghost-CLI logs in CI

no issue

- we might fail the tests but not produce any logs in Ghost-CLI
- concatenating the logs would then fail because of the lack of existence
  of a directory
- this commit adds a check that files exist before trying to get the
  contents of the files
This commit is contained in:
Daniel Lockyer 2022-02-04 09:40:26 +01:00
parent 6ac135d038
commit f55f2b1587
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -255,7 +255,8 @@ jobs:
- name: Print debug logs
if: failure()
run: cat ~/.ghost/logs/*.log
run: |
[ -f ~/.ghost/logs/*.log ] && cat ~/.ghost/logs/*.log
- uses: daniellockyer/action-slack-build@master
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'