Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/internal-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
steps:
- name: Print current ref and sha
run: |
echo "github.ref=${{ github.ref }}"
echo "github.sha=${{ github.sha }}"

- name: Trigger and wait for Internal Tests
uses: actions/github-script@v7
with:
Expand All @@ -35,9 +30,15 @@ jobs:
const targetRepo = 'SpacetimeDBPrivate';
const workflowId = 'internal-tests.yml';
const targetRef = 'master';
const publicRef = context.sha;
// Use the ref for pull requests because the head sha is brittle (github does some extra dance where it merges in master).
const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha;
const preDispatch = new Date().toISOString();

console.log("context.eventName =", context.eventName);
console.log("context.ref =", context.ref);
console.log("context.sha =", context.sha);
console.log("Dispatch workflow with publicRef =", publicRef);

// Dispatch the workflow in the target repository
await github.rest.actions.createWorkflowDispatch({
owner: targetOwner,
Expand Down
Loading