Skip to content

Commit 9268e84

Browse files
committed
chore: base API path improvement, update README.md
1 parent 84b5ef1 commit 9268e84

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Get previous workflow status
33-
uses: Mercymeilya/last-workflow-status@v0.3.1
33+
uses: Mercymeilya/last-workflow-status@v0.3.2
3434
id: last_status
3535
with:
3636
github_token: ${{ secrets.GITHUB_TOKEN }}

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
run: |
3232
WORKFLOW_ID=$(curl --header 'authorization: Bearer ${{ inputs.github_token }}' \
3333
--header 'content-type: application/json' \
34-
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .workflow_id)
34+
${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .workflow_id)
3535
echo "WORKFLOW_ID=$WORKFLOW_ID" >> $GITHUB_ENV
3636
echo "Workflow id: ${WORKFLOW_ID}"
3737
- name: Get previous build status
@@ -40,7 +40,7 @@ runs:
4040
run: |
4141
last_status=$(curl --silent --header 'authorization: Bearer ${{ inputs.github_token }}' \
4242
--header 'content-type: application/json' \
43-
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/${{ env.WORKFLOW_ID }}/runs?per_page=1&status=completed&branch=${{ env.BRANCH_NAME }}" \
43+
"${{ github.api_url }}/repos/${{ github.repository }}/actions/workflows/${{ env.WORKFLOW_ID }}/runs?per_page=1&status=completed&branch=${{ env.BRANCH_NAME }}" \
4444
| jq -r .workflow_runs[0].conclusion)
45-
echo "Status of the previous build: $last_status"
4645
echo "::set-output name=last_status::$last_status"
46+
echo "Status of the previous build: $last_status"

0 commit comments

Comments
 (0)