From 3fad35829884c1d2bbb3a21c3d7c8071c6870a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Mon, 15 May 2023 10:17:26 +0200 Subject: [PATCH 1/3] Automatic PR to framework --- .github/workflows/frameworkPR.yml | 30 +++++++++++++++++++++++ .github/workflows/frameworkValidation.yml | 23 ----------------- 2 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/frameworkPR.yml delete mode 100644 .github/workflows/frameworkValidation.yml diff --git a/.github/workflows/frameworkPR.yml b/.github/workflows/frameworkPR.yml new file mode 100644 index 00000000..f2bd6263 --- /dev/null +++ b/.github/workflows/frameworkPR.yml @@ -0,0 +1,30 @@ +name: Framework pull request + +on: + pull_request: + branches: [ "master" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +defaults: + run: + shell: bash + +jobs: + framework-PR: + runs-on: ubuntu-latest + steps: + - uses: rest-for-physics/framework/.github/actions/submodulePR@submodule-PR + with: + branch: ${{ env.BRANCH_NAME }} + submodule: source/libraries/axion + token: ${{ secrets.REST_TOKEN }} + label: axionlib-pr diff --git a/.github/workflows/frameworkValidation.yml b/.github/workflows/frameworkValidation.yml deleted file mode 100644 index ea5fbe6a..00000000 --- a/.github/workflows/frameworkValidation.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Framework Validation - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - release: - - workflow_dispatch: - -env: - CMAKE_BUILD_TYPE: Release - REST_PATH: /rest/axionlib/install - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - -defaults: - run: - shell: bash - -jobs: - framework-validation: - uses: rest-for-physics/framework/.github/workflows/validation.yml@master From 636940b0bc79c226db221e72b9296ff0de91cacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Mon, 15 May 2023 10:20:14 +0200 Subject: [PATCH 2/3] New workflow to check if PR can be merged from framework --- .github/workflows/frameworkmerge.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/frameworkmerge.yml diff --git a/.github/workflows/frameworkmerge.yml b/.github/workflows/frameworkmerge.yml new file mode 100644 index 00000000..64c77fa8 --- /dev/null +++ b/.github/workflows/frameworkmerge.yml @@ -0,0 +1,17 @@ +name: "Merge PR from framework is required" + +on: + pull_request: + types: [ "opened", "reopened", "created", "closed", "synchronize", "labeled", "unlabeled"] +# Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + label-check: + runs-on: ubuntu-latest + steps: + - name: Check label + if: "contains(github.event.pull_request.labels.*.name, 'framework-pr')" + run: | + echo "framework-pr label is present and this PR can only be merged from framework" + exit 1 + shell: bash From de97e4301553110412c98e87f9aac27854dacbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Fri, 19 May 2023 10:04:05 +0200 Subject: [PATCH 3/3] Update pr-badge.yml --- .github/pr-badge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pr-badge.yml b/.github/pr-badge.yml index f9fb8d68..912ff0ba 100644 --- a/.github/pr-badge.yml +++ b/.github/pr-badge.yml @@ -15,5 +15,5 @@ when: "$additions < 100" - imageUrl: "https://gitlab.cern.ch/rest-for-physics/axionlib/badges/$branchName/pipeline.svg" url: "https://gitlab.cern.ch/rest-for-physics/axionlib/-/commits/$branchName" -- imageUrl: "https://github.com/rest-for-physics/axionlib/actions/workflows/validation.yml/badge.svg?branch=$branchName" - url: "https://github.com/rest-for-physics/axionlib/commits/$branchName" +- imageUrl: "https://github.com/rest-for-physics/framework/actions/workflows/validation.yml/badge.svg?branch=$branchName" + url: "https://github.com/rest-for-physics/framework/commits/$branchName"