Skip to content

Commit

Permalink
Merge pull request #69 from hatena/add-upload-images-action
Browse files Browse the repository at this point in the history
upload-images action を各workflowに組み込む
  • Loading branch information
halkt authored Apr 9, 2024
2 parents fbaf846 + 2a0fab4 commit 1156d7a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/push-draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ name: "[Reusable workflows] push draft to hatena blog"

on:
workflow_call:
inputs:
revision:
default: ''
type: string
secrets:
OWNER_API_KEY:
required: true

jobs:
upload-images:
uses: hatena/hatenablog-workflows/.github/workflows/upload-images.yaml@v1
secrets:
OWNER_API_KEY: ${{ secrets.OWNER_API_KEY }}
push-draft:
if: always()
needs: upload-images
runs-on: ubuntu-latest
env:
BLOGSYNC_PASSWORD: ${{ secrets.OWNER_API_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.revision }}
ref: ${{ needs.upload-images.result == 'success' && needs.upload-images.outputs.revision || '' }}
fetch-depth: 0
- name: setup
uses: hatena/hatenablog-workflows/.github/actions/setup@v1
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/push-published-entries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "[Reusable workflows] push published entries"

on:
workflow_call:
secrets:
OWNER_API_KEY:
required: true

jobs:
upload-images:
if: github.event.pull_request.merged == false
uses: hatena/hatenablog-workflows/.github/workflows/upload-images.yaml@v1
secrets:
OWNER_API_KEY: ${{ secrets.OWNER_API_KEY }}

0 comments on commit 1156d7a

Please sign in to comment.