Skip to content

trying with explicity provided token #13

trying with explicity provided token

trying with explicity provided token #13

name: generating yaml file
on:
push:
branches:
- main
- update_generate_yaml_wf
# paths:
# - 'linkml-schema/source_library_generation/**'
permissions:
contents: write
jobs:
generate_libgen_yaml:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install the required python packages
run: |
python -m pip install .[test]
pip install git+https://github.com/brain-bican/bkbit.git
pip install git+https://github.com/linkml/schemasheets.git@649af7e1
- name: Other installations
run: |
sudo apt-get update
sudo apt-get install -y build-essential git wget curl
# Step 3: Generate yaml model
- name: Generate yaml model
run: |
cd linkml-schema
bkbit schema2model -o library_generation.yaml --gsheet --gsheet-download-dir source_library_generation/gsheet_output source_library_generation/gsheet.yaml --no-inlined
cd ..
# # Step 4: Configure Git user
# - name: Configure Git
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"
# Step 5: Create a new branch
- name: Create a new branch
run: |
BRANCH_NAME="autogenerated-yaml-$(date +%Y%m%d%H%M%S)"
git checkout -b "$BRANCH_NAME"
echo "Branch created: $BRANCH_NAME"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
# # Step 6: Add and commit the new file
# - name: Commit the new file
# run: |
# git add linkml-schema/library_generation.yaml
# git commit -m "Generate new version of the linkml model"
# # Step 7: Push the new branch
# - name: Push the new branch
# run: |
# git push origin "$BRANCH_NAME"
# Step 8: Create a pull request
- name: Create a Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
commit-message: "Generate new version of the linkml model"
branch: ${{ env.BRANCH_NAME }}
title: "Auto PR: yaml generated from google spreadsheets using schemasheets"
body: "This PR adds a autogenerated yaml file."
base: main