From 6608409b9200611a5fbff54a4d89cafb4639db45 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 24 Jan 2025 15:05:34 -0800 Subject: [PATCH] Change the build-semconv-daily workflow --- .github/workflows/build-dev.yml | 9 ----- .github/workflows/build-semconv-daily.yml | 39 +++++++++++-------- .../scripts/use-cla-approved-github-bot.sh | 4 ++ 3 files changed, 26 insertions(+), 26 deletions(-) create mode 100755 .github/workflows/scripts/use-cla-approved-github-bot.sh diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index a082581dd56a..da819bb42103 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -7,14 +7,6 @@ on: description: Regex of submodule paths to update to HEAD before building. default: content-modules type: string - workflow_call: - inputs: - submodule_path_regex: - type: string - required: true - skip_ref_cache_check: - type: boolean - default: false jobs: build-and-test: @@ -60,7 +52,6 @@ jobs: name: REFCACHE updates? needs: build-and-test runs-on: ubuntu-latest - if: ${{ !inputs.skip_ref_cache_check }} steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 diff --git a/.github/workflows/build-semconv-daily.yml b/.github/workflows/build-semconv-daily.yml index 8778066a19a8..03c283d6d6a1 100644 --- a/.github/workflows/build-semconv-daily.yml +++ b/.github/workflows/build-semconv-daily.yml @@ -1,4 +1,4 @@ -name: Build Semantic Conventions (daily) +name: Update semconv-latest branch (daily) on: schedule: @@ -7,20 +7,25 @@ on: workflow_dispatch: jobs: - build-dev: - uses: ./.github/workflows/build-dev.yml - with: - submodule_path_regex: semantic-conventions - skip_ref_cache_check: true + update-semconv-latest-branch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # TODO (trask) may need to use OPENTELEMETRYBOT_GITHUB_TOKEN in order for PR workflows to get triggered + ref: semconv-latest - workflow-notification: - needs: - - build-dev - if: always() - uses: ./.github/workflows/reusable-workflow-notification.yml - with: - success: ${{ needs.build-dev.result == 'success' }} - repo: open-telemetry/semantic-conventions - secrets: - opentelemetrybot_github_token: - ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + - name: Use CLA approved github bot + run: .github/workflows/scripts/use-cla-approved-github-bot.sh + + - name: Rebase + run: | + git fetch origin + git rebase origin/main + git push origin semconv-latest + + - name: Update semconv submodule + run: | + git submodule update --init --remote content-modules/semantic-conventions + git commit -am "Update semconv submodule" + git push origin semconv-latest diff --git a/.github/workflows/scripts/use-cla-approved-github-bot.sh b/.github/workflows/scripts/use-cla-approved-github-bot.sh new file mode 100755 index 000000000000..a4c68b0e308e --- /dev/null +++ b/.github/workflows/scripts/use-cla-approved-github-bot.sh @@ -0,0 +1,4 @@ +#!/bin/bash -e + +git config user.name opentelemetrybot +git config user.email 107717825+opentelemetrybot@users.noreply.github.com