Skip to content

Commit

Permalink
Merge pull request #52 from nasubi916/51-github-actions
Browse files Browse the repository at this point in the history
51 GitHub actions
  • Loading branch information
nasubi916 authored Apr 2, 2024
2 parents 94706a3 + 638815f commit 720e4f0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/obsidian-export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: obsidian-export
on:
[push]

jobs:
cloudflare-r2:
# Ubuntuの最新版環境内で処理を実行することを指定
runs-on: ubuntu-latest
steps:
- name: Get R2 bucket usage
id: get_r2-bucket-usage
env:
ACCOUNT_ID: ${{ secrets.account_id }}
BUCKET_NAME: ${{ secrets.bucket_name }}
API_TOKEN: ${{ secrets.api_token }}
run: |
curl -s -X GET "https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/storage/kv/namespaces/${BUCKET_NAME}/keys" \
-H "Authorization: Bearer ${API_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
- uses: actions/checkout@v3

- name: download obsidian-export.exe
run: |
curl -L https://github.com/zoni/obsidian-export/releases/download/v23.12.0/obsidian-export-x86_64-unknown-linux-gnu.tar.xz -o obsidian-export.tar.xz
xz -dc obsidian-export.tar.xz | tar xfv -
chmod +x obsidian-export-x86_64-unknown-linux-gnu/obsidian-export
- name: Run obsidian-export
run: ./obsidian-export-x86_64-unknown-linux-gnu/obsidian-export --help

0 comments on commit 720e4f0

Please sign in to comment.