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: support the ability to retrieve & output information properly when running in workflows #11

Merged
merged 7 commits into from
Jun 12, 2023

Conversation

jaylenw
Copy link
Member

@jaylenw jaylenw commented Jun 8, 2023

What does this PR do?

Modified the code to properly obtain the information the composite action requires using GitHub Input Variables and GITHUB_OUTPUT rather than node-config.

Background info

For some reason, using node-config was just not working at all for running the composite action in another repository but oddly was when it was self-invoked in this repository. I re-factored code to make sure we only relied on node-config for testing only if needed but GitHub INPUT_ variables for everything else. There could be additional improvements that can be done with the code but improvements can be made at a later time.

In addition, there is something odd about composite actions not able to retrieve environment variables in repositories not of their own. I am not sure why this is the case but did some digging and referenced the following:

How can this be tested (manually and/or automated test)?

Provide Manual tests Steps if applicable

Refer to the Usage section of the README.md in using this action in your GitHub Actions workflow of your repository.
For this particular case, reference this action with uses: cityoflosangeles/fetch-latest-github-release@ghi-10 to test out these changes from this branch.

Provide steps for running automated tests if applicable

Checkout this branch and run npm test.

Which issue(s) is/are related to this PR?

This PR is/are related to issue(s) #10

close #10

@jaylenw jaylenw self-assigned this Jun 8, 2023
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Code coverage

Filename Statements Branches Functions Lines
action.js 79.25% 61.54% 66.67% 79.25%

@jaylenw jaylenw marked this pull request as ready for review June 8, 2023 01:13
@jaylenw jaylenw requested a review from a team as a code owner June 8, 2023 01:13
Copy link
Contributor

@RV-LACity RV-LACity left a comment

Choose a reason for hiding this comment

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

Looks good. Great work @jaylenw !

@jaylenw
Copy link
Member Author

jaylenw commented Jun 12, 2023

Thanks @RV-LACity

@jaylenw jaylenw merged commit 3675e3c into development Jun 12, 2023
@ita-devops-release-manager ita-devops-release-manager bot added the staged PRs that have been merged into the development branch containing changes yet to be pushed to prod label Jun 12, 2023
@jaylenw jaylenw added released PRs that have had their changes released to production and removed staged PRs that have been merged into the development branch containing changes yet to be pushed to prod labels Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released PRs that have had their changes released to production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to fetch latest release due to not able to retrieve necessary information
2 participants