Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto-trigger code sample testing #1367

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

m-murasovs
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sample is added so that the workflow gets triggered - it's also added in another PR


- name: Call Code Sample Tester Actor
env:
APIFY_TOKEN: ${{ secrets.CODE_SAMPLE_TESTER_ACTOR_TOKEN }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to add a token for this once the actor is moved to the Apify account

curl --fail-with-body -X POST "https://api.apify.com/v2/acts/X8D0L4wfpO8fCL1uL/run-sync" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-d '{ "branch": "'"$BRANCH_NAME"'" }'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work on PRs from forks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The run in the console suggests otherwise
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I've modified the action and the actor so that the owner of the triggering repo is passed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, sorry I deleted that comment because I realised it was wrong, but hadn't seen your second one yet :)

.github/workflows/test-code-samples.yaml Outdated Show resolved Hide resolved
.github/workflows/test-code-samples.yaml Outdated Show resolved Hide resolved
@m-murasovs m-murasovs requested a review from janbuchar December 20, 2024 11:08
@m-murasovs m-murasovs marked this pull request as ready for review December 20, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants