Skip to content

Commit

Permalink
Send private toot
Browse files Browse the repository at this point in the history
  • Loading branch information
o01eg committed Jan 28, 2025
1 parent 624c8ee commit f5173ba
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build_weekly_scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
echo ${{ github.token }} | gh auth login --with-token
WORKFLOW_ID=$(gh api -X GET /repos/${{ github.repository }}/actions/runs/${{ github.run_id }} --jq='.workflow_id')
TOTAL_COUNT=$(gh api -X GET "/repos/${{ github.repository }}/actions/workflows/${WORKFLOW_ID}/runs?status=success&per_page=1&head_sha=${{ github.sha }}" --jq '.total_count')
echo "Runs count: ${TOTAL_COUNT}"
echo "Runs success count: ${TOTAL_COUNT}"
if (( $TOTAL_COUNT == 0 )); then
TOTAL_COUNT=$(gh api -X GET "/repos/${{ github.repository }}/actions/workflows/${WORKFLOW_ID}/runs?status=in_progress&per_page=1&head_sha=${{ github.sha }}" --jq '.total_count')
echo "Runs in progress count: ${TOTAL_COUNT}"
fi
echo "runs-count=${TOTAL_COUNT}" >> "$GITHUB_OUTPUT"
macos:
needs: check-run
Expand Down Expand Up @@ -60,3 +64,12 @@ jobs:
merge-multiple: true
- name: Check artifacts
run: ls -l .
- name: Toot
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.MASTODON_ACCESS_TOKEN }}" \
-H "Idempotency-Key: ${{ github.sha }}" \
--data-raw 'status=@[email protected] Test Build ${{ github.sha }}' \
-d 'visibility=direct' \
-d 'language=en' \
https://fosstodon.org/api/v1/statuses

0 comments on commit f5173ba

Please sign in to comment.