From 822fb4b713d3b456931dffc4ffaf8893b70febf2 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 11 Oct 2022 18:37:58 +0200 Subject: [PATCH] Only on default branch --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a3c0f6..6cc62f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,22 @@ concurrency: cancel-in-progress: true jobs: + job_only_on_default1: + runs-on: ubuntu-latest + if: $${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + steps: + - run: echo should work only on default + job_only_on_default2: + runs-on: ubuntu-latest + if: ${{ github.ref }} == refs/heads/${{ github.event.repository.default_branch }} + steps: + - run: echo should work only on default 2 + job_only_on_default3: + runs-on: ubuntu-latest + if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + steps: + - run: echo should work only on default + test: runs-on: windows-2022 defaults: