Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic PR to framework #80

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/pr-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
message: "Ok: $additions"
color: "green"
when: "$additions < 100"
- imageUrl: "https://github.com/rest-for-physics/detectorlib/actions/workflows/validation.yml/badge.svg?branch=$branchName"
url: "https://github.com/rest-for-physics/detectorlib/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"
30 changes: 30 additions & 0 deletions .github/workflows/frameworkPR.yml
Original file line number Diff line number Diff line change
@@ -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/detector
token: ${{ secrets.REST_TOKEN }}
label: detectorlib-pr
23 changes: 0 additions & 23 deletions .github/workflows/frameworkValidation.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/frameworkmerge.yml
Original file line number Diff line number Diff line change
@@ -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