Giter VIP home page Giter VIP logo

action-workflow_run-status's Introduction

action-workflow_run-status's People

Contributors

dependabot[bot] avatar haya14busa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

action-workflow_run-status's Issues

Job not found

Workflow snippet triggered on workflow_run:

jobs:
  preview:
    name: 'Deploy Preview'
    runs-on: ubuntu-20.04
    if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
    steps:
      - uses: haya14busa/action-workflow_run-status@v1

This workflow works correctly, but breaks when trying to use this action as above. Actions error log:

Run haya14busa/action-workflow_run-status@v1
  with:
    github_token: ***
    requested_as_pending: true
Error: job not found: preview

This is likely the same issue that was recently closed by the issue author for unknown reasons. Unlike others chiming in there I am not using any matrix.


Quick glance over the code suggests that job.name is probably Deploy Preview which is obviously not going to match the context.job that the error logs as preview. Presumably if I match the name value to the job object name the two values will resolve this issue.

const job = jobs.data.jobs.find(j => j.name === context.job)
if (!job) {
throw new Error(`job not found: ${context.job}`)
}

It looks like you could reference a job by id? For those using a matrix, that may not work? context.github.job provides the current job id. Will this work?:

const job = jobs.data.jobs.find(j => j.id === context.github.job)

I don't develop actions, and the documentation is lacking what the context.job.job object contains. One issue I linked to mentions context.jobId but I am lacking documentation to know if that's suggested or valid.

action not reporting status back to github

  1. Works just fine in all cases around deep level of 1.
  2. If you try using deep level 2 aka:
    a) Have one job depending on other
    b) Having third job depending on second
    The action is not reporting the status back.

Job not found: build

Getting the following error while using this action:

##[error]job not found: build

Support matrix

#21 is closed, but still not found issue happen on matrix.

Run haya14busa/action-workflow_run-status@v1
  with:
    github_token: ***
    requested_as_pending: true
  env:
    ...
    CI_NODE_TOTAL: 4
    PARALLEL_STEPS: 1
    CI_NODE_GROUP: 4
Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Error: job not found: System-Test

Screenshot 2023-02-15 at 15 26 51

I think we need some option for matrix like:

jobs:
  post-test-success:
    runs-on: ubuntu-latest
    steps:
      - uses: haya14busa/action-workflow_run-status@v1
        with:
          matrix: ${{ matrix.node_group }}
      - uses: actions/checkout@v2

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.