Skip to content

Commit

Permalink
リクエストヘッダのコロンが抜けていたりしたのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mtgto committed Oct 27, 2024
1 parent 98dc781 commit 4f22d2e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
release:
types: [released]

# bashを使うようにしてpipefailを有効にする
# https://docs.github.com/ja/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell
defaults:
run:
shell: bash

jobs:
update:
runs-on: ubuntu-latest
Expand All @@ -12,14 +18,18 @@ jobs:
id: sha256
run: |
browser_download_url=$(echo '${{ toJSON(github.event.release.assets) }}' | jq -r '.[] | select(.name | endswith(".dmg")) | .browser_download_url')
SHA256=$(curl -L "${browser_download_url}" | sha256sum | cut -d ' ' -f 1)
echo $browser_download_url
SHA256=$(curl --fail -L "${browser_download_url}" | sha256sum | cut -d ' ' -f 1)
echo "sha256=${SHA256}"
echo "sha256=${SHA256}" >> "GITHUB_OUTPUT"
- name: dispatch
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_MACSKK_TOKEN }}
run: |
curl \
-H "Authorization token $GITHUB_TOKEN" \
--fail \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/mtgto/homebrew-macSKK/dispatches \
-d '{"event_type":"update","client_payload":{"version":"${{ github.event.release.tag_name }}","sha256":"${{ steps.sha256.outputs.sha256 }}"}}'

0 comments on commit 4f22d2e

Please sign in to comment.