Skip to content

Enhancement: Allow usage when GITHUB_REF or ACTIONS_CACHE_REF are defined#317

Closed
localheinz wants to merge 1 commit intoactions:masterfrom
localheinz:feature/alternative
Closed

Enhancement: Allow usage when GITHUB_REF or ACTIONS_CACHE_REF are defined#317
localheinz wants to merge 1 commit intoactions:masterfrom
localheinz:feature/alternative

Conversation

@localheinz
Copy link
Copy Markdown

@localheinz localheinz commented May 16, 2020

This PR

  • allows use when GITHUB_REF environment variable is not defined, but ACTIONS_CACHE_REF

Follows #263 (comment).

💁‍♂️ I would like to be able to use actions/cache for deployment events.

Here's my use case:

  • I create a deployment in workflows, e.g., when pushing to a branch that should be deployed to a staging environment, or when pushing to a branch that should be deployed to a production environment
  • I process deployment events in a separate workflow, where an application is deployed to an environment depending on the payload of the deployment event, and here I would like to be able to use actions/cache to speed up builds. For deployment events, GITHUB_REF is not defined.

❓I'm wondering, the previously available RefKey is only used to verify whether the environment variable GITHUB_REF is defined, but as far as I could see, the actual value of GITHUB_REF is never used. Why is that the case? Why do we care in the first place?

@localheinz localheinz force-pushed the feature/alternative branch 2 times, most recently from d3e772c to 229896e Compare May 17, 2020 08:16
@localheinz localheinz force-pushed the feature/alternative branch from 229896e to f67cfd1 Compare May 17, 2020 08:20
@localheinz localheinz force-pushed the feature/alternative branch from f67cfd1 to 77fd223 Compare May 17, 2020 08:20
@localheinz localheinz mentioned this pull request May 17, 2020
1 task
@joshmgross
Copy link
Copy Markdown
Contributor

👋 Thanks for your support @localheinz, please see my response on your other PR: #318 (comment) as to why this won't work and consider filing an issue for your use-case.

@joshmgross joshmgross closed this May 17, 2020
@localheinz localheinz deleted the feature/alternative branch May 17, 2020 18:01
@localheinz
Copy link
Copy Markdown
Author

Thank you, @joshmgross!

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