Coder Social home page Coder Social logo

Comments (5)

code-ape avatar code-ape commented on June 3, 2024 2

Cause of the issue is this line below which is set to something like refs/pull/52/merge on pull requests and thus fails.

await checkout(getEnv('GITHUB_REF'));

Looks like this needs to be updated to be GITHUB_HEAD_REF if present (which is for PRs) and then fall back to GITHUB_REF.

from action-detect-and-tag-new-version.

dfreeman avatar dfreeman commented on June 3, 2024

Hi @marcinwfilewave, sorry for the long silence! I seem to have completely missed this issue being filed.

I'm not sure off the top of my head why this would fail for pull requests but not other workflow triggers.

Can you tell me more about why you want to run this action for PRs? I generally wouldn't want to allow anyone opening a pull request to my repo to be able to create tags every time they push a commit to their branch, but maybe you have a development flow in mind that I hadn't considered 🙂

from action-detect-and-tag-new-version.

pinkasey avatar pinkasey commented on June 3, 2024

I just ran into this myself -
I was trying to see If I can use this cool GH Action in my repo, so my first step was to open a branch and create a new workflow, that will only run on my branch.
the lazy way to do this is:

on: pull_request

(since no other branch has this new workflow).

But that's not really something I need -
I'm now changing this to a more appropriate triger:

on:
  push:
    branches:
      # this is my test-branch:
      - eyal_ci_if_version 

from action-detect-and-tag-new-version.

pinkasey avatar pinkasey commented on June 3, 2024

BTW,

on:
  push:
    branches:
      # this is my test-branch:
      - eyal_ci_if_version 

didn't work either, I still got the same error.

I've managed to solve it by doing this:

      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ref: eyal_ci_if_version

(I guess this GH action assume it will only be ran on master/main. which is reasonable. posting here to help others.)
(I also upgraded actions/checkout to v2)

from action-detect-and-tag-new-version.

code-ape avatar code-ape commented on June 3, 2024

FYI. This issue still exists and is something I hit today. Will try and post if I track down root cause.

from action-detect-and-tag-new-version.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.