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: only run Asana jobs if the secrets are present #14

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

paulswartz
Copy link
Member

This avoids failures when running on PRs from forks.

We do it in this convoluted way because you can't access secrets directly from if blocks: actions/runner#520

You can see it working in this action run: https://github.com/mbta/api/actions/runs/5469630640/jobs/9958897744

This avoids failures when running on PRs from forks.

We do it in this convoluted way because you can't access secrets
directly from `if` blocks: actions/runner#520
@paulswartz paulswartz requested a review from bklebe July 5, 2023 22:53
@paulswartz paulswartz merged commit 4f4c6d5 into main Jul 24, 2023
@paulswartz paulswartz deleted the ps-ignore-missing-secrets branch July 24, 2023 13:18
paulswartz added a commit that referenced this pull request Aug 7, 2023
This avoids failures when running on PRs from forks.

We do it in this convoluted way because you can't access secrets
directly from `if` blocks: actions/runner#520

The key differences between this and
#14 are:
- typo: should be `outputs` in the `if` blocks
- more explicity check for the secrets in a Bash script, so we can see
the output
- use `yes` instead of `true` as the value to more clearly distinguish
the value from a true boolean
paulswartz added a commit that referenced this pull request Aug 7, 2023
This avoids failures when running on PRs from forks.

We do it in this convoluted way because you can't access secrets
directly from `if` blocks: actions/runner#520

The key differences between this and
#14 are:
- typo: should be `outputs` in the `if` blocks
- more explicity check for the secrets in a Bash script, so we can see
the output
- use `yes` instead of `true` as the value to more clearly distinguish
the value from a true boolean
paulswartz added a commit that referenced this pull request Aug 7, 2023
This avoids failures when running on PRs from forks.

We do it in this convoluted way because you can't access secrets
directly from `if` blocks: actions/runner#520

The key differences between this and
#14 are:
- typo: should be `outputs` in the `if` blocks
- more explicity check for the secrets in a Bash script, so we can see
the output
- use `yes` instead of `true` as the value to more clearly distinguish
the value from a true boolean
paulswartz added a commit that referenced this pull request Aug 7, 2023
This avoids failures when running on PRs from forks.

We do it in this convoluted way because you can't access secrets
directly from `if` blocks: actions/runner#520

The key differences between this and
#14 are:
- typo: should be `outputs` in the `if` blocks
- more explicity check for the secrets in a Bash script, so we can see
the output
- use `yes` instead of `true` as the value to more clearly distinguish
the value from a true boolean
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