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

Add workflow to output github.ref when the triggering event is a release #28

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

bquan0
Copy link
Collaborator

@bquan0 bquan0 commented Aug 30, 2023

This PR adds a short workflow called releaseTest.yml whose purpose is to print out the value of the default variable github.ref. Although I mostly only care about the results when the event is a release, I also made the workflow run on pull_request and push just to see what the variable contains on those runs.

After this PR is merged, I will create a new release on the main branch to trigger this workflow to see what github.ref is when the triggering event is release.

This PR was motivated by a recent PR on the PyNE repo where we have decided to integrate the name of releases as a tag for the latest image as well as the name of the virtual machine. While this test is not completely necessary, I think it's still a good idea to verify that our intended use of github.ref does work as we think it will, especially since the results can only be obtained after merging a PR and creating a release.

@gonuke gonuke merged commit f33cb19 into cnerg:main Aug 31, 2023
5 checks passed
uses: actions/checkout@v3

- name: See what github.ref is on release
run: echo ${{ github.ref }}
Copy link
Member

Choose a reason for hiding this comment

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

maybe you want github.ref_name instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, I think that will work. I didn't consider it at first because it didn't have "release" in the description 😅

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