-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ParlaMint Sample root file generation to github actions #226
- Loading branch information
1 parent
9dd3b4a
commit 5ffe039
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Update ParlaMint Sample root files' | ||
#description: '' | ||
inputs: | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Root | ||
run: | | ||
cd $GITHUB_WORKSPACE/ParlaMint | ||
for t_i in TEI_ TEI.ana_.ana en.TEI.ana_-en.ana; do | ||
type=${t_i%_*}; | ||
interfix=${t_i#*_}; | ||
$s base=../Samples type=$type isSample=1 -xsl:Scripts/parlamint2root.xsl Scripts/ParlaMint-rootTemplate.xml \ | ||
> Samples/ParlaMint$interfix.xml ; | ||
done | ||
git status | ||
git diff --quiet || git commit -m "action: generating ParlaMint roots for Sample folder #${{github.event.number}}" Samples/ParlaMint*.xml | ||
git push | ||
shell: bash | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: ParlaMintSample2root | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
Changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
parla_process: '${{ steps.detect-changes.outputs.parla_process }}' | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout ParlaMint | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ParlaMint | ||
fetch-depth: 2 # when called a pull_request - test is run on test merge -> full history is not needed to detect changes | ||
- name: Setup | ||
uses: ./ParlaMint/.github/actions/ParlaMintEnvSetup | ||
with: | ||
repo_token: ${{secrets.GITHUB_TOKEN}} | ||
- name: Commit new sample root | ||
uses: ./ParlaMint/.github/actions/ParlaMintSample2root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters