Skip to content

Commit

Permalink
update workflow with tag: v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ms3-bot committed Oct 1, 2023
1 parent dd4fe95 commit 4b57fc8
Show file tree
Hide file tree
Showing 6 changed files with 608 additions and 73 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/annotation_branch.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: check_labels

on:
push:
branches-ignore:
- main

jobs:
perform_check:
if: github.event.pusher.name != 'ms3-bot'
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v2
with:
path: main
token: ${{ secrets.MS3_BOT_TOKEN }}
- uses: lots0logs/[email protected]
id: modified
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Display changed files
continue-on-error: true
run: |
echo "${{ steps.modified.outputs.modified }}"
echo "${{ join(steps.modified.outputs.modified) }}"
cat ${HOME}/files_modified.json
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Clone ms3
uses: actions/checkout@v2
with:
repository: johentsch/ms3
ref: workflow
path: ./ms3
- name: Install ms3
run: |
python -m pip install --upgrade pip
python -m pip install -e ms3
- name: Run ms3 check
working-directory: ./main
run: |
ms3 check -f ${HOME}/files_modified.json --assertion
66 changes: 66 additions & 0 deletions .github/workflows/compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: label_comparison

on: pull_request


jobs:
compare:
if: github.actor != 'ms3-bot'
runs-on: ubuntu-latest
steps:
- name: Output context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Checkout PR
uses: actions/checkout@v2
with:
path: main
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.MS3_BOT_TOKEN }}
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Clone ms3
uses: actions/checkout@v2
with:
repository: johentsch/ms3
ref: workflow
path: ./ms3
- name: Install ms3
run: |
python -m pip install --upgrade pip
python -m pip install -e ./ms3
- uses: lots0logs/[email protected]
id: modified
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Display changed files
continue-on-error: true
run: cat ${HOME}/files_modified.json
- name: Run ms3 compare
working-directory: ./main
run: |
ms3 compare -f ${HOME}/files_modified.json
- name: Generate modulation plans
working-directory: ./main
continue-on-error: true
run: |
python -m pip install plotly
python .github/workflows/gantt.py -f ${HOME}/files_modified.json
- name: Commit comparison files
working-directory: ./main
continue-on-error: true
run: |
git config --global user.name "ms3-bot"
git config --global user.email [email protected]
git config --global user.token ${{ secrets.MS3_BOT_TOKEN }}
git add -A
git commit -m "Added comparison files for review"
- name: Push files
working-directory: ./main
continue-on-error: true
run: |
git push
92 changes: 92 additions & 0 deletions .github/workflows/extract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: ms3_extract

on:
push:
branches:
- main
jobs:
extract:
if: github.event.pusher.name != 'ms3-bot'
runs-on: ubuntu-latest

steps:
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Checkout main
uses: actions/checkout@v2
with:
path: main
token: ${{ secrets.MS3_BOT_TOKEN }}
- name: Pull current workflow
working-directory: ./main
run: |
wget https://github.com/DCMLab/annotation_workflow_template/archive/refs/heads/main.zip
unzip main.zip
cp -r annotation_workflow_template-main/.github .
rm -r annotation_workflow_template-main/
rm main.zip
- name: Configure git and push updated workflow
working-directory: ./main
continue-on-error: true
run: |
git config --global user.name "ms3-bot"
git config --global user.email [email protected]
git config --global user.token ${{ secrets.MS3_BOT_TOKEN }}
git add -A
git commit -m "Current version of workflows"
git push
- name: Clone ms3
uses: actions/checkout@v2
with:
repository: johentsch/ms3
ref: workflow
path: ./ms3
- name: Install ms3
run: |
python -m pip install --upgrade pip
python -m pip install -e ./ms3
- uses: lots0logs/[email protected]
id: modified
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Display changed and added files
continue-on-error: true
run: |
cat ${HOME}/files_modified.json
cat ${HOME}/files_added.json
- name: Run ms3 extract
working-directory: ./main
run: |
ms3 extract -f ${HOME}/files_modified.json -M -N -X -D
ms3 extract -f ${HOME}/files_added.json -M -N -X -D
- name: Push files
working-directory: ./main
continue-on-error: true
run: |
git add -A
git commit -m "Automatically added TSV files from parse with ms3"
git push
- name: Clone corpusstats
uses: actions/checkout@v2
with:
repository: DCMLab/corpus_statistics_generator
path: ./corpusstats
ref: main
token: ${{ secrets.MS3_BOT_MAINTENANCE }}
- name: Install corpusstats
run: python -m pip install -e ./corpusstats
- name: Generate GitHub pages
working-directory: ./main
run: |
python .github/workflows/update_pages.py -g ${{ github.repository }} -t ${{ secrets.MS3_BOT_MAINTENANCE }} -d tonicizations -o ../public
- name: Display generated files
working-directory: ./public
run: ls
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
enable_jekyll: true
Loading

0 comments on commit 4b57fc8

Please sign in to comment.