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

global env overrides local with #295

Closed
3 of 5 tasks
marekdedic opened this issue Oct 2, 2020 · 2 comments · Fixed by #300
Closed
3 of 5 tasks

global env overrides local with #295

marekdedic opened this issue Oct 2, 2020 · 2 comments · Fixed by #300
Assignees
Labels
bug Something isn't working

Comments

@marekdedic
Copy link

Describe the bug
Hi, I had the following code in my action file:

name: "CI"
on:
  push:
    branches: "*"
  pull_request:
env:
  php-version: 7.4
  cache-version: 1
jobs:
  platform-check:
    name: "PHP 5.6 compatibility"
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout"
        uses: actions/checkout@v2

      - name: "Setup PHP"
        uses: shivammathur/setup-php@v2
        with:
          php-version: 5.6
          coverage: none

      - name: "Check dependency compatibility"
        run: |
          composer check-platform-reqs --no-dev

The env variable was then used for all the jobs except the one described in the snippet. However, with this config, the global env overrode the local with and I got version 7.4 for the job! Now, I agree that it was probably stupid of me to choose the same name, however, I would really expect this to use 5.6 for this job...

Version

  • I have checked releases and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
ubuntu

Additional context
See skaut/skaut-google-drive-gallery#671 for full run/patch.

Are you willing to submit a PR?
No, I have no idea how to fix this.

@marekdedic marekdedic added the bug Something isn't working label Oct 2, 2020
@shivammathur shivammathur mentioned this issue Oct 5, 2020
@shivammathur
Copy link
Owner

@marekdedic This should be fixed now after 2.6.0 release.
with will be preferred over env.

@marekdedic
Copy link
Author

Hi,
thanks for the fix, it works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants