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

fix: run only on main, forks ok #2166

Merged

Conversation

anwalker293
Copy link
Contributor

Addresses issue #2152 (https://indicio.atlassian.net/browse/ACAP-1004)

I did not include an environment variable, as GitHub seems to throw up its hands when you put it in the workflow file. There seems to be a workaround if you put the variable in .env, but I'm not sure if we want that though...

@anwalker293 anwalker293 reopened this Mar 20, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@anwalker293
Copy link
Contributor Author

Re: edit: fix: on schedule - Sorry, I put in for the flows to run on push of the main branch for testing purposes. Just removed this now, so this flow should only run nightly

.github/workflows/nightly-tests.yml Outdated Show resolved Hide resolved
.github/workflows/nightly-tests.yml Outdated Show resolved Hide resolved
.github/workflows/nightly-tests.yml Outdated Show resolved Hide resolved
dbluhm
dbluhm previously approved these changes Apr 5, 2023
@dbluhm dbluhm linked an issue Apr 5, 2023 that may be closed by this pull request
@dbluhm
Copy link
Contributor

dbluhm commented Apr 5, 2023

A quick confidence check (and a third party review since Alex is on my team 🙂) on this would be appreciated before I hit merge @WadeBarnes @swcurran

@swcurran swcurran requested a review from WadeBarnes April 5, 2023 18:18
Copy link
Contributor

@WadeBarnes WadeBarnes left a comment

Choose a reason for hiding this comment

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

I've typically used github.event.repository.full_name to get the repository name. I believe you also need to wrap the variable names in ${{ }}.

Examples:

@anwalker293 anwalker293 force-pushed the fix/nightly-runs-on-main branch 3 times, most recently from b657848 to e9c13f7 Compare April 6, 2023 16:11
@anwalker293
Copy link
Contributor Author

@WadeBarnes I wanted to follow up with you regarding these changes. Thank you for your suggestion, it's greatly appreciated! It looks like this issue is more optional than strictly a problem (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif). For the time being, I did keep the original format, but, if desired, I can change the format
However, I do greatly appreciate any advice, so please let me know if there's anything else you would like me to change!
Cheerio!

@WadeBarnes
Copy link
Contributor

@anwalker293, Have you run any tests using this new workflow on your branch? For example tried to trigger it as is on your branch to make sure it behaves as expected and then changed the github.repository to match yours to ensure it triggers as expected? Also have you tested the workflow dispatch trigger?

We can see from here, https://github.com/hyperledger/aries-cloudagent-python/actions/runs/4630877399, it's running, but is it behaving as intended on another repo?

@anwalker293
Copy link
Contributor Author

@WadeBarnes I believe so! :) I tested it on my fork of this repo, on the branch test (https://github.com/anwalker293/aries-cloudagent-python/actions/runs/4691869092)

@WadeBarnes
Copy link
Contributor

@WadeBarnes I believe so! :) I tested it on my fork of this repo, on the branch test (https://github.com/anwalker293/aries-cloudagent-python/actions/runs/4691869092)

That's a different workflow, it's the codeql.yml workflow. You're PR is for the nightly-tests.yml workflow. I don't see any runs associated to it in your repo.

@anwalker293
Copy link
Contributor Author

@WadeBarnes Fixed! (+ the manual triggering for forks can be found here: https://github.com/anwalker293/aries-cloudagent-python/actions/runs/4788375998)

@WadeBarnes WadeBarnes force-pushed the fix/nightly-runs-on-main branch from c120125 to b4d90a7 Compare April 24, 2023 18:23
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@WadeBarnes WadeBarnes enabled auto-merge April 24, 2023 18:25
@WadeBarnes WadeBarnes merged commit 4ac664e into openwallet-foundation:main Apr 24, 2023
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.

Nightly tests on main fork only?
3 participants