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

output final commit sha #348

Closed
trim21 opened this issue Jun 11, 2020 · 5 comments
Closed

output final commit sha #348

trim21 opened this issue Jun 11, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request proposal

Comments

@trim21
Copy link

trim21 commented Jun 11, 2020

Is your feature request related to a problem? Please describe

No

Describe the solution you'd like

core.setOutput('sha', sha)

so user can access this commit by ${{ steps.gh-pages.outputs.sha}}

Describe alternatives you've considered

Additional context

@peaceiris peaceiris added the enhancement New feature or request label Jun 12, 2020
@peaceiris
Copy link
Owner

Thank you for suggesting this!

Yes. That looks useful. A longer option name may be easier to understand as follows.

core.setOutput('pages_commit_hash', sha);

I also considered the following output parameter names.

  • published_commit_hash
  • deployed_commit_hash
  • generated_commit_hash

We want to differentiate a publish_branch's commit hash from source branch's one. Does anybody have any better ideas of the output parameter name? Please tell us here!

I will work on this with #300, #344, and others.

@sidvishnoi
Copy link

How about src_sha and dst_sha?

@peaceiris
Copy link
Owner

Cool!

We already have ${{ github.sha }} in the GitHub Actions contexts. (src_sha)

The GitHub Actions context uses github.sha so we will choose dst_sha. (destination)

Thanks @sidvishnoi

@peaceiris peaceiris removed the stale label Jun 18, 2020
@peaceiris peaceiris mentioned this issue Oct 11, 2020
2 tasks
@peaceiris
Copy link
Owner

peaceiris commented Oct 11, 2020

Could someone test #514 as follows?

- name: Deploy
  uses: peaceiris/actions-gh-pages@7e55c73 #514
  id: pages
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}

- run: echo ${{ steps.pages.outputs.dst_sha }}

@pabluk
Copy link

pabluk commented Oct 21, 2020

Could someone test #514 as follows?

I tested this on a current workflow I'm using for an Hugo site and it works as expected 👍

Thanks a lot for this feature!

@trim21 trim21 closed this as completed Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal
Projects
None yet
Development

No branches or pull requests

4 participants