Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

GHA: add copyright action #593

Merged
merged 2 commits into from
Sep 2, 2020
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
40 changes: 40 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Copyright
on:
issue_comment:
types: [created]
jobs:
edit:
name: Copyright
if: ${{ github.event.comment.body == '@votca-bot copyright' }}
runs-on: ubuntu-latest
steps:
- name: Check if message comes from PR
uses: octokit/request-action@v2.x
id: issue_info
with:
route: GET /repos/:repository/issues/:pull_number
repository: ${{ github.repository }}
pull_number: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get PR info
if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
uses: octokit/request-action@v2.x
id: pr_info
with:
route: GET /repos/:repository/pulls/:pull_number
repository: ${{ github.repository }}
pull_number: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout head branch from PR
if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
uses: actions/checkout@v2.2.0
with:
repository: ${{ fromJSON(steps.pr_info.outputs.data).head.repo.full_name }}
ref: ${{ fromJSON(steps.pr_info.outputs.data).head.ref }}
fetch-depth: 0
token: ${{ secrets.VOTCA_BOT_TOKEN }}
- name: Create and commit copyright updates
if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
uses: votca/actions/copyright@master
with:
base: ${{ fromJSON(steps.pr_info.outputs.data).base.sha }}
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Version 2021-dev
- make scripts always executable in builddir (#533, #550, #556)
- rename REGRESSIONTEST\_TOLERANCE to INTEGRATIONTEST\_TOLERANCE (#534)
- standardising include order and style in library files (#542)
- move CI to GitHub Ations (#551, #552, #553, #561, #562)
- move CI to GitHub Ations (#551, #552, #553, #561, #562, #593)
- format CMake internal cpp code (#557)
- update codacy badge (#558)
- convert markdown to rst format (#559)
Expand Down