You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this simple working YAML definition which allows me to start CI for all OSs when [CI] string is in the commit message of the last commit of a git branch:
name: .NET Coreon: [push, pull_request]jobs:
build:
# If you want to do a CI check for your commit, include `[ci]` (or `[CI]`) anywhere in the git commit message.if: "contains(github.event.head_commit.message, '[ci]')"# Second parameter is not case sensitive.strategy:
matrix:
operatingSystem: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]runs-on: ${{ matrix.operatingSystem }}timeout-minutes: 10steps:
- uses: actions/checkout@v2
- name: Setup .NET Coreuses: actions/setup-dotnet@v1with:
dotnet-version: 5.0.x
- name: Install dependenciesrun: dotnet restore
- name: Buildrun: dotnet build --configuration Release --no-restore
- name: Testrun: dotnet test --no-restore --verbosity normal
I would love to add [ci_mac] and [ci_win] magic strings so that only the specified OS is used in the CI run.
I thought that something like this if: "matrix.os == 'macos-latest' && contains(github.event.head_commit.message, '[ci_mac]')" would help me but keep hitting the wall. It seems this is actually hard-ish problem.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have this simple working YAML definition which allows me to start CI for all OSs when
[CI]
string is in the commit message of the last commit of a git branch:I would love to add
[ci_mac]
and[ci_win]
magic strings so that only the specified OS is used in the CI run.I thought that something like this
if: "matrix.os == 'macos-latest' && contains(github.event.head_commit.message, '[ci_mac]')"
would help me but keep hitting the wall. It seems this is actually hard-ish problem.Thank you!
(#982)
Beta Was this translation helpful? Give feedback.
All reactions