diff --git a/.github/pr-badge.yml b/.github/pr-badge.yml index bd4445de..0d23cddc 100644 --- a/.github/pr-badge.yml +++ b/.github/pr-badge.yml @@ -13,5 +13,5 @@ message: "Ok: $additions" color: "green" when: "$additions < 100" -- imageUrl: "https://github.com/rest-for-physics/restG4/actions/workflows/validation.yml/badge.svg?branch=$branchName" - url: "https://github.com/rest-for-physics/restG4/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" diff --git a/.github/workflows/frameworkPR.yml b/.github/workflows/frameworkPR.yml new file mode 100644 index 00000000..b8f34455 --- /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/packages/restG4 + token: ${{ secrets.REST_TOKEN }} + label: restG4-pr diff --git a/.github/workflows/frameworkValidation.yml b/.github/workflows/frameworkValidation.yml deleted file mode 100644 index 3116f53c..00000000 --- a/.github/workflows/frameworkValidation.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Framework Validation - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - release: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -env: - CMAKE_BUILD_TYPE: Release - REST_PATH: /rest/restG4/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 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