Skip to content

Commit

Permalink
get base sha
Browse files Browse the repository at this point in the history
  • Loading branch information
jainankit committed Dec 7, 2023
1 parent db4ad29 commit 50130f8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/aviator-targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ jobs:
node-version: '18'
cache: 'yarn'
- run: yarn install
- uses: octokit/[email protected]
id: get_pr
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.number }}
owner: octokit
repo: request-action
env:
GITHUB_TOKEN: ${{ github.token }}

- run: "echo latest sha: '${{ fromJson(steps.get_pr.outputs.data).base.sha }}'"
- run: |
set -euo pipefail
git fetch origin $GITHUB_BASE_REF
PR_NUMBER=${{ github.event.number }}
TARGETS_JSON=$(npx nx show projects --affected --base FETCH_HEAD --head HEAD --json)
TARGETS_JSON=$(npx nx show projects --affected --base FETCH_HEAD --head ${{ github.sha }} --json)
echo $TARGETS_JSON
curl -X POST -H "Authorization: Bearer ${{ secrets.AVIATOR_API_TOKEN }}" \
-H "Content-Type: application/json" \
Expand Down

0 comments on commit 50130f8

Please sign in to comment.