changes to manannot with Aozan #652
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
name: Convert ELAN to TEI | |
on: | |
push: | |
branches: | |
- "main" | |
repository_dispatch: | |
types: [run] | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: get python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: "pipenv" | |
- name: convert ELAN to TEI | |
env: | |
SP_USERNAME: ${{ secrets.SP_USERNAME }} | |
SP_PWD: ${{ secrets.SP_PWD }} | |
run: | | |
python --version | |
python -m pip install pipenv | |
cd 080_scripts_generic/080_01_ELAN2TEI | |
pipenv install | |
pipenv run jupyter nbconvert --to script ELAN2TEI.ipynb | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} pipenv run python ELAN2TEI.py | |
- name: Commit auto generated files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add 103_tei_w/*.xml | |
git add 130_vert_plain/*.txt | |
git commit -m "Automatic generated TEI files" -a | |
- name: Push changes back to GitHub | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Create tags based on git data | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/acdh-oeaw/shawi-data/shawi-noske | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=raw,value={{sha}} | |
- name: login to github container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: build and push to ghcr.io | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./nosketchengine/Dockerfile | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true | |
_3: | |
needs: [build] | |
uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy-cluster-2.yml@main | |
secrets: inherit | |
with: | |
DOCKER_TAG: "ghcr.io/acdh-oeaw/shawi-data/shawi-noske" | |
APP_NAME: "shawi-noske" | |
APP_ROOT: "/" | |
POSTGRES_ENABLED: false | |
environment: "${{ github.ref_name }}" | |
default_port: "8080" |