Skip to content
Discussion options

You must be logged in to vote

You can use a workaround I think

pre-commit:
  jobs:
    - only: 
        - run: uname # only on linux/macos
      script: your-shell-script.sh
    - only: 
        - run: cmd /c ver # only on windows
      script: your-powershell-script.ps1

Or with commands

pre-commit:
  jobs:
    - only: 
        - run: uname # only on linux/macos
      run: echo 'Hello from *nix'
    - only: 
        - run: cmd /c ver # only on windows
      run: echo 'Hello from Windows'

You can check the docs on skip option, the only has similar configuration.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@cezarlamann
Comment options

@mrexox
Comment options

@cezarlamann
Comment options

Answer selected by cezarlamann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants