Merge pull request #35 from harp-tech/aind-devices #5
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: "gen-whoami-table" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'whoami.yml' | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Python dependencies | |
uses: py-actions/py-dependency-install@v4 | |
with: | |
path: ".github/workflows/requirements.txt" | |
- name: Generate table | |
run: | | |
python3 .github/workflows/gen-whoami-table.py whoami.yml | |
- name: Commit changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add whoami.md | |
git commit -m "Update device WhoAmI table" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |