From 6e34f76215e8262fbffb241eeada47d1be6ae3fa Mon Sep 17 00:00:00 2001 From: Alex Parsons Date: Wed, 26 Feb 2025 22:03:00 +0000 Subject: [PATCH] fixup! Add github action to update parliament data --- .github/workflows/update.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index b6d4c24f..3c290418 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -32,7 +32,10 @@ jobs: id: update run: | output=$(poetry run scripts/dataupdate --verbose) - echo "update_output=$output" >> "$GITHUB_OUTPUT" + output=$(echo "$output" | jq -sR .) + echo "update_output<> "$GITHUB_OUTPUT" + echo "$output" >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" - name: Push new data id: auto-commit-action @@ -48,8 +51,8 @@ jobs: payload: | { "repo_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "status:" "success", - "content": "${{ steps.update.outputs.update_output }}" + "status": "success", + "content": ${{ steps.update.outputs.update_output }} } env: SLACK_WEBHOOK_URL: ${{ secrets.PARLPARSE_SLACK_WEBHOOK }} @@ -61,9 +64,9 @@ jobs: with: payload: | { - "repo_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - "status:" "failed" - "content": "${{ steps.update.outputs.update_output }}" + "repo_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", + "status": "failed", + "content": ${{ steps.update.outputs.update_output }} } env: SLACK_WEBHOOK_URL: ${{ secrets.PARLPARSE_SLACK_WEBHOOK }} \ No newline at end of file