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

Commit

Permalink
fix(workflow): use json-to-variables
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjokumsen committed Dec 2, 2022
1 parent c407fca commit 0ec51ad
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,18 @@ jobs:
- run: unzip pr.zip

- name: 'Get PR Number'
id: set-pr
shell: pwsh
run: |
$json = Get-Content ./NR | ConvertFrom-Json
echo $json.pr
echo $json.ref
echo "pr=$json.pr" >> $GITHUB_OUTPUT
echo "ref=$json.ref" >> $GITHUB_OUTPUT
- name: 'Set PR Number'
id: set_pr
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: 'NR'
prefix: pr

- uses: actions/checkout@v3
name: Checkout this repo to access action
with:
path: './action-repo'
ref: ${{ steps.set_pr.outputs.ref }}
ref: ${{ env.pr_ref }}

- uses: actions/checkout@v3
name: Checkout chill-viking/github-actions-tests
Expand All @@ -79,6 +76,6 @@ jobs:
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ steps.set-pr.outputs.pr }},
issue_number: ${{ env.pr_pr }},
body: 'Testing action for ${{ matrix.os }} was successful!'
});

0 comments on commit 0ec51ad

Please sign in to comment.