~emersion/mrsh

9f43095b93c7ceacb5aadf7ff96912f342c52e10 — Simon Ser 5 months ago c89c540
ci: automate sr.ht annotations generation
1 files changed, 24 insertions(+), 0 deletions(-)

A .builds/annotate.yml
A .builds/annotate.yml => .builds/annotate.yml +24 -0
@@ 0,0 1,24 @@
image: archlinux
packages:
  - mrsh-git
  - annotatesh-git
sources:
  - https://git.sr.ht/~emersion/mrsh
secrets:
  - a00689d3-2a09-4e1b-a5f9-83d1082f1704
tasks:
  - annotatesh: |
      cd mrsh
      annotatesh-git >annotations.json
  - upload: |
      cd mrsh
      set +x # hide secrets
      oauth_token="$(cat ~/.annotate-token)"
      owner='~emersion'
      repo='mrsh'
      curl -X PUT \
        -H "Authorization: token $oauth_token" \
        -H "Content-Type: application/json" \
        -d @annotations.json \
        https://git.sr.ht/api/"$owner"/repos/"$repo"/annotate