question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow caching for deployment events or other events without GITHUB_REF

See original GitHub issue

As suggested in #317 and #318, I would like to be able to use actions/cache for events where the GITHUB_REF environment variable is not necessarily defined.

For example, I currently have decoupled the creation and the processing of deployments.

  • one ore more workflows create deployment (with differing payloads) using the Deployments API
  • a workflow is triggered by a deployment event and process the actual deployment to different environments

Currently, even with #263, it is not possible to use caching for the deployment event (see @joshmgross’ comments in #317). Consequently, deployments using a workflow setup describes as above either take a lot longer, or are not feasible.

It would be really nice to be able to use actions/cache with a setup as described!

Let me know if there is anything I can do to help push this feature through the door.

🌱

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:26
  • Comments:8

github_iconTop GitHub Comments

10reactions
Fedeorlandaucommented, Mar 7, 2022

This would be massive for us. We’re running cypress after Vercel’s deployment.

name: Run E2E Tests
on: [deployment_status]
jobs:
  e2e:
    if: github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
          cache: 'yarn'
      - run: yarn
      - run: yarn cypress:headless --env host=${{ github.event.deployment_status.target_url }}
5reactions
RichiCoder1commented, Sep 7, 2020

Would love this for the exact reason of deployment events.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Events that trigger workflows - GitHub Docs
Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git...
Read more >
7 Github Actions Tricks I Wish I Knew Before I Started
Here are 7 tricks with github actions that changed my life (or at least my CI/CD pipeline). These tricks helped me create a...
Read more >
How do I use dependency caching for GitHub actions when ...
I'm following this tutorial on using preview deployments to run Cypress ... GITHUB_REF is undefined if the event is triggered from a commit, ......
Read more >
Enabling API caching to enhance responsiveness
Learn how to enable Amazon API Gateway caching to enhance your API's performance. ... When you enable caching for a stage, API Gateway...
Read more >
4.2 GitHub Actions | Technical Guidelines - Mirai Solutions
1 Workflow steps. A workflow should have an identifying name and an on section that indicates upon which events the workflow should be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found