From 242f39bdf34eed31252e631856ebb2c6196e449d Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 1 Aug 2024 16:46:08 -0600 Subject: [PATCH] Add condition to skip generate-workflows --- .../src/generate_workflows_lib/misc.yml.j2 | 5 +++++ .github/workflows/misc_0.yml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 index e39336beab..b502ca2b47 100644 --- a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 +++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 @@ -19,6 +19,11 @@ jobs: {{ job_data }}: name: {{ job_data }} runs-on: ubuntu-latest + {%- if job_data == "generate-workflows" %} + if: | + !contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows') + && github.actor != 'opentelemetrybot' + {%- endif %} steps: - name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %} uses: actions/checkout@v4 diff --git a/.github/workflows/misc_0.yml b/.github/workflows/misc_0.yml index 631ffa60cc..391b377bbb 100644 --- a/.github/workflows/misc_0.yml +++ b/.github/workflows/misc_0.yml @@ -93,6 +93,9 @@ jobs: generate-workflows: name: generate-workflows runs-on: ubuntu-latest + if: | + !contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows') + && github.actor != 'opentelemetrybot' steps: - name: Checkout repo @ SHA - ${{ github.sha }} uses: actions/checkout@v4