From 186d7e33a660e7c0540e48ec302cb57a15674cfa Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 1 Feb 2024 21:05:28 +0100 Subject: [PATCH] Fix script step --- .gitea/workflows/ci-pipeline.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 6154ab1..ef60af2 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -77,9 +77,9 @@ jobs: - uses: actions/checkout@v4 - name: Trigger Remote Script run: | - response=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://your-server-ip:5000/trigger-script -H "Authorization: SecretToken") - if [ "$response" -ne 200 ]; then + response=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://your-server-ip:5000/trigger-script -H "Authorization: SecretToken") + if [ "$response" -ne 200 ]; then echo "Script execution failed with HTTP status $response" exit 1 - fi - if: success() && github.ref == 'refs/heads/main' + fi + if: success() && github.ref == 'refs/heads/main'