We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 476dbf6 commit 376d56dCopy full SHA for 376d56d
.github/workflows/post_to_mastodon.yml
@@ -11,7 +11,16 @@ jobs:
11
runs-on: ubuntu-latest
12
steps:
13
- name: Post to Mastodon
14
- run: |
+ - uses: nick-fields/retry@v2
15
+ with:
16
+ timeout_minutes: 2
17
+ max_attempts: 3
18
+ command: |
19
curl -X POST -H "Authorization: Bearer ${{ secrets.MASTODON_ACCESS_TOKEN }}" \
20
-F "status=Pull request #${{ github.event.pull_request.number }} merged: ${{ github.event.pull_request.title }}" \
- https://fediscience.org/api/v1/statuses
21
+ https://fediscience.org/api/v1/statuses \
22
+ -w "\nResponse code: %{http_code}\n" \
23
+ -f || {
24
+ echo "Failed to post to Mastodon"
25
+ exit 1
26
+ }
0 commit comments