Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-dvorak committed Sep 24, 2023
1 parent b36bd24 commit 9c39925
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/metadata_updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Metadata updater

on:
push:
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f doc/assets/workflows/requirements.txt ]; then pip install -r doc/assets/workflows/requirements.txt; fi
- name: Update metadata
env:
gh_repo: ${{ github.event.repository.name }}
gh_url: ${{ github.server_url }}/${{ github.repository }}
gh_branch: ${{ github.head_ref || github.ref_name }}
gh_description: ${{ github.event.repository.name }}
gh_repository: ${{ github.repository }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 doc/assets/workflows/update_metadata.py
python3 doc/assets/workflows/update_kitspace.py
- uses: stefanzweifel/[email protected]
with:
commit_message: Update metadata files
commit_options: '-a'
41 changes: 41 additions & 0 deletions .github/workflows/update_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update actions and assets repository
on:
schedule:
- cron: "0 */24 * * *"

push:
paths:
- '.gitmodules'

workflow_dispatch:

jobs:
Aktualizace:
name: Update repository actions and other tools
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}

- name: Update submodules
run: |
git -C doc/assets config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
git submodule sync doc/assets
git submodule update --init --remote doc/assets
- name: Update submodules
run: |
git submodule update --remote doc/assets/
- name: Zaktualizovat skripty
run: |
cd doc/assets/workflows/ && ./copy_workflow_to_repo.sh && cd ${GITHUB_WORKSPACE}
- uses: stefanzweifel/[email protected]
with:
commit_message: Update workflow files
add_options: '-A'
commit_options: '-a'
2 changes: 1 addition & 1 deletion doc/assets

0 comments on commit 9c39925

Please sign in to comment.