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

Fix unexpected skipped deployment step #57

Merged
merged 5 commits into from
May 5, 2024

Conversation

ctmbl
Copy link
Contributor

@ctmbl ctmbl commented May 4, 2024

https://github.com/iScsc/blog.iscsc.fr/actions/runs/8949748241 has been skipped while it should not have been because https://github.com/iScsc/blog.iscsc.fr/pull/56/files contained a change in ./src and was a merge == a push to main

@ctmbl ctmbl force-pushed the fix-skipped-workflows branch 6 times, most recently from 14b201d to 8d18c60 Compare May 5, 2024 00:16
@ctmbl
Copy link
Contributor Author

ctmbl commented May 5, 2024

with workflow code:

          echo ${{ github.event.repository.fork }}
          echo ${{ github.event_name }}
          echo ''
          echo ${{ '1' == '1' }}
          echo ${{ ('1' == '1') }}
          echo ${{ ('1' == '1') || 'a' == 'b' }}
          echo ${{ ('1' == '1' && '2' == '2') }}
          echo ${{ ('1' == '1' && '2' == '2') || 'a' == 'b' }}
          echo ''
          echo ${{ github.event_name == 'pull_request' }}
          echo ${{ github.event.repository.fork == 'false' }}
          echo ${{ ! github.event.repository.fork }}
          echo ${{ (github.event_name == 'pull_request') }}
          echo ${{ (github.event_name == 'pull_request' && github.event.repository.fork == 'false') }}
          echo ${{ (github.event_name == 'pull_request') || github.event_name == 'workflow_dispatch' }}
          echo ${{ (github.event_name == 'pull_request' && github.event.repository.fork == 'false') || github.event_name == 'workflow_dispatch' }}

I got the output:

 false
pull_request

true
true
true
true
true

true
false
true
true
false
true
false

here: https://github.com/iScsc/blog.iscsc.fr/actions/runs/8954207026/job/24593567567

The important part is that:
${{ github.event.repository.fork }} evaluates to false
${{ github.event.repository.fork == 'false' }} evaluates to false despite the previous line!!!
${{ ! github.event.repository.fork }} evaluates to true which is expected!!

@ctmbl ctmbl changed the title Fix unexpected skipped workflow step Fix unexpected skipped deployment step May 5, 2024
@ctmbl ctmbl merged commit 5b2c6e3 into iScsc:main May 5, 2024
4 checks passed
@ctmbl ctmbl deleted the fix-skipped-workflows branch May 5, 2024 00:38
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

Successfully merging this pull request may close these issues.

None yet

1 participant