From 0220c38ecaacde49cda49a52d286500a78607e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Fri, 12 May 2023 19:42:28 +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 0000000..e8b8f6c --- /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/geant4 + token: ${{ secrets.REST_TOKEN }} + label: geant4lib-pr diff --git a/.github/workflows/frameworkValidation.yml b/.github/workflows/frameworkValidation.yml deleted file mode 100644 index 1611988..0000000 --- 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/geant4lib/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 ff353aa9ea1d04c43c23f59c49e5d84b86b1bd46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Fri, 12 May 2023 19:44:48 +0200 Subject: [PATCH 2/3] Create frameworkmerge.yml --- .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 0000000..64c77fa --- /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 31100ac9c4f1ca367661a5677a71bf8cf99af84e 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 09:58:29 +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 43f9323..ca9ec31 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/geant4lib/badges/$branchName/pipeline.svg" url: "https://gitlab.cern.ch/rest-for-physics/geant4lib/-/commits/$branchName" -- imageUrl: "https://github.com/rest-for-physics/geant4lib/actions/workflows/validation.yml/badge.svg?branch=$branchName" - url: "https://github.com/rest-for-physics/geant4lib/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"