Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
ci: fix deployer (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
book000 committed Jun 17, 2023
1 parent dd61a69 commit e63eb40
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,10 @@ jobs:

- name: Deploy
id: deployRequest
uses: fjogeleit/http-request-action@master
with:
url: ${{ secrets.DEPLOY_URL }}
method: 'POST'
bearerToken: ${{ secrets.DEPLOY_KEY }}
ignoreStatusCodes: '500'
timeout: 600000

- name: Show Response
run: echo ${{ steps.deployRequest.outputs.response }}
run: |
response=$(curl -i -X POST -H 'Authorization: Bearer ${{ secrets.DEPLOY_KEY }}' "${{ secrets.DEPLOY_URL }}")
echo "$response"
echo "response=$response" >> $GITHUB_OUTPUT
- name: Is Successful Deploy
if: ${{ fromJson(steps.deployRequest.outputs.response).status == 'SUCCESSFUL' }}
Expand All @@ -83,7 +77,7 @@ jobs:
https://github.com/${{ github.repository }}/releases/tag/${{ needs.maven-ci.outputs.tag }}
- name: Is Failed Deploy
if: ${{ fromJson(steps.deployRequest.outputs.response).status == 'ERROR' }}
if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -94,8 +88,7 @@ jobs:
エラー内容は以下の通りです。
```
${{ fromJson(steps.deployRequest.outputs.response).type }} (${{ fromJson(steps.deployRequest.outputs.response).type_ja }}) - ${{ fromJson(steps.deployRequest.outputs.response).status }} (${{ fromJson(steps.deployRequest.outputs.response).status_ja }})
${{ fromJson(steps.deployRequest.outputs.response).message }}
${{ steps.deployRequest.outputs.response }}
```
- name: Is Successful Deploy
Expand Down

0 comments on commit e63eb40

Please sign in to comment.