Skip to content

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Oct 5, 2022

This PR changes the setup of the workflow to only set the SHARE env variable if the current branch is main.

I have no way of testing this completely until is merged into main.

I first tried to set either 1 or an empty string to the SHARE variable but it didn't work (bechmarks.ips only checks if the env variable is set, not the value, so an empty var triggers the sharing too).

Instead, I went with the solution from the docs here https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files, making the step that sets the env variable conditional to the branch name.

Fixes #207

@arielj arielj changed the title Set the SHARE env variable only if current branch is main Set the SHARE env variable only if current branch is main (WIP) Oct 5, 2022
@arielj arielj changed the title Set the SHARE env variable only if current branch is main (WIP) Set the SHARE env variable only if current branch is main Oct 5, 2022
@arielj arielj changed the title Set the SHARE env variable only if current branch is main Set the SHARE env variable only if current branch is main (WIP) Oct 5, 2022
@arielj arielj force-pushed the feature/share-on-main branch from 3a6bc05 to aa4e792 Compare October 5, 2022 13:50
@arielj arielj changed the title Set the SHARE env variable only if current branch is main (WIP) Set the SHARE env variable only if current branch is main Oct 5, 2022
@rishijain
Copy link

the changes lgtm.

Copy link
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

Great idea, thanks!

@etagwerker etagwerker merged commit 327444a into main Nov 6, 2022
@etagwerker etagwerker deleted the feature/share-on-main branch November 6, 2022 00:10
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.

[CHANGE] Share of results should only happen when running GitHub Actions in the main branch
3 participants