From 875874c1407f28e15b39df114c6e99464188796b Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 15 May 2024 13:22:49 +0200 Subject: [PATCH] ci: fix push_readme.yml Use a `if` rather than a `&&`. The action was failing in case nothing changed in the `README.md` file. Now the action will just skip committing & pushing. --- .github/workflows/push_readme.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push_readme.yml b/.github/workflows/push_readme.yml index 0066a2adb..5d4d8bc3f 100644 --- a/.github/workflows/push_readme.yml +++ b/.github/workflows/push_readme.yml @@ -30,8 +30,9 @@ jobs: git config --local user.name "github-actions[bot]" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git add -A - git commit -m "Readme update" \ - && git push https://$USERNAME:$PUSH_HACSPEC_GITHUB_TOKEN@github.com/hacspec/hacspec.github.io + if git commit -m "Readme update"; then + git push https://$USERNAME:$PUSH_HACSPEC_GITHUB_TOKEN@github.com/hacspec/hacspec.github.io + fi env: PUSH_HACSPEC_GITHUB_TOKEN: ${{secrets.PUSH_HACSPEC_GITHUB_TOKEN}} USERNAME: github-actions[bot]