Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The steps context seems to be empty #126

Closed
JJ opened this issue Sep 9, 2019 · 2 comments
Closed

The steps context seems to be empty #126

JJ opened this issue Sep 9, 2019 · 2 comments

Comments

@JJ
Copy link

JJ commented Sep 9, 2019

I've used this to try and print the steps context:

name: "Info from repo"
on: [pull_request]

jobs:
  obtain-repo:
    runs-on: ubuntu-latest
    steps:
      - name: get-diff
        uses: JJ/github-pr-contains-action@releases/v1
        with:
          github-token: ${{github.token}}
          filesChanged: 1
      - name: dump-steps-test
        env:
          STEPS_CONTEXT: ${{ toJson(steps) }}
        run: echo "$STEPS_CONTEXT"
      - name: obtain-repo
        uses: JJ/repo-in-diff-gh-action@releases/v0
        with:
          diff: ${{steps.get-diff.outputs.diff}}

But it's apparently empty. Any idea?

@damccorm
Copy link
Contributor

damccorm commented Sep 9, 2019

steps uses the step id, not the name. So in your previous step it would need to be something like:

      - id: get-diff 
        name: get-diff
        uses: JJ/github-pr-contains-action@releases/v1
        with:
          github-token: ${{github.token}}
          filesChanged: 1

@JJ
Copy link
Author

JJ commented Sep 9, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants