Skip to content

chore(deps-dev): bump @types/node from 16.18.29 to 16.18.48 #96

chore(deps-dev): bump @types/node from 16.18.29 to 16.18.48

chore(deps-dev): bump @types/node from 16.18.29 to 16.18.48 #96

Workflow file for this run

name: pr-test
on:
issue_comment:
types: [created]
jobs:
print_refs:
name: Test PR
if: ${{ github.event.comment.body == '/test' }}
runs-on: ubuntu-latest
# Checkout PR and test that the action still works with it
steps:
- name: resolve pr refs with v0.0.1
id: refs
uses: eficode/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: checkout PR code
uses: actions/checkout@v3
with:
ref: ${{ steps.refs.outputs.head_ref }}
- name: resolve pr refs with PR version
id: refs_in_test
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: update status
run: |
echo "base_ref: ${{ steps.refs_in_test.outputs.base_ref }}"
echo "head_ref: ${{ steps.refs_in_test.outputs.head_ref }}"
STATE=success
if [[ "${{ steps.refs_in_test.outputs.base_ref }}" == "" ]]; then
STATE=failure
elif [[ "${{ steps.refs_in_test.outputs.base_sha }}" == "" ]]; then
STATE=failure
elif [[ "${{ steps.refs_in_test.outputs.head_ref }}" == "" ]]; then
STATE=failure
elif [[ "${{ steps.refs_in_test.outputs.head_sha }}" == "" ]]; then
STATE=failure
elif [[ "${{ steps.refs_in_test.outcome }}" != "success" ]]; then
STATE=failure
fi
SHA=$(git rev-parse HEAD)
curl --request POST \
--url "https://api.github.com/repos/${{ github.repository }}/statuses/$SHA" \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'accept: application/vnd.github.v3+json' \
--header 'content-type: application/json' \
--data "{
\"state\": \"$STATE\",
\"context\": \"pr-test\",
\"target_url\": \"${{ github.event.issue.pull_request.url }}\"
}" \
--fail
if [[ "$STATE" == "failure" ]]; then
echo "state=failure"
exit 1
fi