Skip to content

Commit

Permalink
fixing 2-3
Browse files Browse the repository at this point in the history
  • Loading branch information
kilamaelie committed Feb 12, 2024
1 parent 5d04f80 commit 88cf76c
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,20 @@ jobs:
docker-compose -f docker-compose.ci.yml build 2>error >&1
- name: create an issue
if: ${{ failure() }}
run: |
ERROR=$(cat error)
echo "$ERROR"
curl --request POST \
--url "https://api.github.com/repos/${{ github.repository }}/issues" \
--header "authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
--header "content-type: application/json" \
if: ${{ failure() }}
run: |
echo $(cat error)
ERROR=$(cat error)
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/issues \
--header 'authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"title": "Automated issue for a commit: ${{ github.job }}",
"body": "## Description\n\nThis issue was automatically created by the GitHub Action.\n\nThe Job **`${{ github.job }}`** of the workflow run **`${{ github.run_number }}`** failed with the following error:\n\n`'"$ERROR"'`\n\n## Run details\n\n- Workflow: `${{ github.workflow }}`\n\n- The actor of the run: `${{ github.actor }}`\n\n- The commit hash was: `${{ github.sha }}`\n\nKindly fix it in the shortest time possible.\n\nThank you."
}' \
"title": "Automated issue for commit: ${{ github.job }}",
"body": "## Description\n\nThis issue was automatically created by the GitHub Action.\n\nThe Job **`${{github.job}}`** of the workflow run **`${{github.run_number}}`** failed with the following error:\n\n`'"$ERROR"'`\n\n## Run details\n\n- Workflow: `${{ github.workflow }}`\n\n- The actor of the run: `${{ github.triggering_actor }}`\n\n- The commit hash was: _${{ github.sha }}_\n\nKindly fix it in the shortest time possible.\n\nThank you."
}' \
--fail
- name: Push images
run: |
docker push ${{ env.WEBSITE_IMAGE }}
Expand Down

0 comments on commit 88cf76c

Please sign in to comment.