Coder Social home page Coder Social logo

Comments (5)

phips28 avatar phips28 commented on August 16, 2024

can you share your config file?

this action does not publish to npm, do you have an other action for that?

from gh-action-bump-version.

NeonWizard avatar NeonWizard commented on August 16, 2024

I'm getting this same problem. Here is my configuration:

name: Bump NPM Package Version

on:
  workflow_dispatch:
  pull_request:
    branches: [ develop ]
    types: [ closed ]

jobs:
  version:
    name: Version
    if: ${{ github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: develop
          token: REDACTED

      - uses: phips28/gh-action-bump-version@master
        env:
          GITHUB_TOKEN: REDACTED
        with:
          target-branch: 'develop'
          skip-tag: true
          # only increment patch version (default)
          # regardless of commit history
          minor-wording: 'SOME UNIQUE STRING THAT WILL NEVER BE USED HOPEFULLY'
          major-wording: 'SOME UNIQUE STRING THAT WILL NEVER BE USED HOPEFULLY'
          rc-wording: 'SOME UNIQUE STRING THAT WILL NEVER BE USED HOPEFULLY'

from gh-action-bump-version.

phips28 avatar phips28 commented on August 16, 2024

Can you spot the error? maybe you can provide a fix via PR. I am currently limited in time to debug this issue :(

from gh-action-bump-version.

NeonWizard avatar NeonWizard commented on August 16, 2024

Can you spot the error? maybe you can provide a fix via PR. I am currently limited in time to debug this issue :(

I'll see if I can take a peek sometime within the next week. For now, I managed to get the desired behavior with the following temporary workaround. Using on: push rather than on: pull_request lets the action work from the perspective of the branch being merged into, rather than the perspective of the branch being merged. This may give a hint as to what the issue is.

name: Bump NPM Package Version

on:
  workflow_dispatch:
  push:
    branches: [ develop ]

jobs:
  version:
    name: Version
    if: ${{ startsWith(github.event.head_commit.message, 'Merge pull request') || github.event_name == 'workflow_dispatch' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: develop
          token: REDACTED

      - uses: phips28/gh-action-bump-version@master
        env:
          GITHUB_TOKEN: REDACTED
        with:
          target-branch: 'develop'
          skip-tag: true
          # only increment patch version (default)
          # regardless of commit history
          minor-wording: 'SOME UNIQUE STRING THAT WILL NEVER BE USED HOPEFULLY'
          major-wording: 'SOME UNIQUE STRING THAT WILL NEVER BE USED HOPEFULLY'
          rc-wording: 'SOME UNIQUE STRING THAT WILL NEVER BE USED HOPEFULLY'

from gh-action-bump-version.

robgutsopedra avatar robgutsopedra commented on August 16, 2024

Hey,

Just wanted you to know I'm still experiencing this exact same issue.

I have the following:

on:
  pull_request:
    types:
      - closed
jobs:
  setup-test-build:
    name: Setup, Build, Bump_version, test, Push Docker Image to GCR
    runs-on: self-hosted
    if: github.event.pull_request.merged == true
- name: 'Automated Version Bump'
        uses: 'phips28/gh-action-bump-version@master'
        continue-on-error: false
        env:
            GITHUB_TOKEN: REDACTED
        with:
            minor-wording: 'feat,feature,minor,add,Adds,new,Debug'

The error I am getting is:

image

And I suspect it will always fail as long as I'm working with pull request and not with pushes. Clearly the line failing is -->

image

I'm guessing the parameter it should be getting on a pull request is not github_ref but base_ref, shouldn't it?

from gh-action-bump-version.

Related Issues (20)

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.