Embraser01 / update-git-branch-action

Action to update a branch based on the current commit
MIT License
12 stars 5 forks source link

action fails #3

Open miguelcobain opened 4 years ago

miguelcobain commented 4 years ago

Hi. 👋

I was trying to use this action on our project, but the action fails with the following log:

Current runner version: '2.272.0'
Operating System
  Ubuntu
  18.04.4
  LTS
Virtual Environment
  Environment: ubuntu-18.04
  Version: 20200806.0
  Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20200806.0/images/linux/Ubuntu1804-README.md
Prepare workflow directory
Prepare all required actions
Download action repository 'actions/checkout@master'
Download action repository 'Embraser01/update-git-branch-action@v1.0.0'
##[error]Embraser01/update-git-branch-action/v1.0.0/action.yml (Line: 18, Col: 3): Unexpected value 'main'
##[error]Embraser01/update-git-branch-action/v1.0.0/action.yml (Line: 18, Col: 3): Unexpected value 'main'
##[error]System.ArgumentNullException: Value cannot be null. (Parameter 'You are using a JavaScript Action but there is not an entry JavaScript file provided in Embraser01/update-git-branch-action/v1.0.0/action.yml.')
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContex[...]
##[error]Fail to load Embraser01/update-git-branch-action/v1.0.0/action.yml

Do you know what might be happening?

Embraser01 commented 4 years ago

Hi,

The error is weird 🤔

The main field is supported but it seems to make the action fail.

Maybe the YAML I wrote is not fully compatible with Github's YAML parser?

But I don't really see what's wrong with it:

https://github.com/Embraser01/update-git-branch-action/blob/36713b64f99cf4f4752e4b7ede74be8f81eb7788/action.yml#L1-L21

queengooborg commented 3 years ago

If I had to guess, perhaps it's something to do with the env variable? Looking at the docs, it seems that it isn't supported, which leads me to believe it may be conflicting with the main variable. (I'd try to require that .pnp.js file not through the command line, it seems like an odd way to go about it.)

LinqLover commented 1 year ago

FWIW, I was not able to fix this action either, the .pnp.js would fail to execute for me. I ended up with a few simple lines of bash:

https://github.com/LinqLover/create-image/blob/3477aca9d3fa681e896cc8a4e964fa36f40555f5/.github/workflows/release.yml#L8-L17

  update-branch:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - shell: bash
      run: |
        git config --global user.name "GitHub Actions"
        git config --global user.email "github-actions[bot]@users.noreply.github.com"
        git branch -f latest
        git push -f origin latest

Maybe we really don't need a separate action for a task of that complexity?