Skip to content
Merged
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
20 changes: 20 additions & 0 deletions .github/workflows/check_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check the protocol on pull request

on:
pull_request:
types: [synchronize, opened, reopened, edited] #en zie https://github.com/actions/runner/issues/980
branches:
- main

jobs:
run_if:
if: startsWith(github.head_ref, 's[fioap]p-')
runs-on: ubuntu-latest
name: "check protocol"
env:
GITHUB_PAT: ${{ secrets.PAT }}
steps:
- name: Check protocol
uses: ElsLommelen/actions/protocol_check@protocols
with:
GITHUB_PAT: ${{ secrets.PAT }}
23 changes: 23 additions & 0 deletions .github/workflows/check_maintenance_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check branch without protocol

on:
pull_request:
types: [synchronize, opened, reopened, edited]
branches:
- main

jobs:
run_if:
if: !startsWith(github.head_ref, 's[fioap]p-')
runs-on: ubuntu-latest
name: "check branch without protocol"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check where changes are made
run: |
CHANGED=$(git diff --name-only main | grep -v NEWS\.md | grep -v \.zenodo\.json| grep -v ^src/)
if [ -n "${CHANGED}" ]; then
echo '\nBranch '$GITHUB_HEAD_REF' contains changes in protocols. Please make a branch named after the protocol_code to add changes to a protocol. Protocol specific files:' $CHANGED
exit 1
fi
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
tags:
- 'protocols-****.**'

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get tag message
run: |
TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)')
echo "::set-output name=TAG_BODY::$TAG_BODY"
id: tag-body
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.tag-body.outputs.TAG_BODY }}
draft: false
prerelease: false
19 changes: 19 additions & 0 deletions .github/workflows/update-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: On merge to main, build the protocol and add it to the website

on:
push:
branches:
- main

jobs:
build-website:
runs-on: ubuntu-latest
name: "add protocol to website"
env:
GITHUB_PAT: ${{ secrets.PAT }}
steps:
- name: Checkout repo
uses: ElsLommelen/actions/protocol_website@protocols
with:
GITHUB_PAT: ${{ secrets.PAT }}
GITHUB_REPOSITORY_DEST: "ElsLommelen/protocols"
20 changes: 20 additions & 0 deletions .github/workflows/update_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Update protocol (.zenodo.json and NEWS.md)

on:
pull_request_review:
types: [submitted]
branches:
- main

jobs:
run_if:
if: ${{ (github.event.review.state == 'approved') && (startsWith(github.head_ref, 's[fioap]p-')) }}
runs-on: ubuntu-latest
name: "update protocol"
env:
GITHUB_PAT: ${{ secrets.PAT }}
steps:
- name: Update protocol
uses: ElsLommelen/actions/protocol_update@protocols
with:
GITHUB_PAT: ${{ secrets.PAT }}