Skip to content

library-listing

library-listing #839

# This is a basic workflow to help you get started with Actions
name: library-listing
# Controls when the workflow will run
on:
schedule:
- cron: '30 5 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: '.github/requirements.txt'
- run: pip install -r .github/requirements.txt
- name: Build the libraries
env: # Or as an environment variable
CLIENT_ID_mo: ${{ secrets.API_CLIENT_ID_MODELICA }}
CLIENT_SECRET_mo: ${{ secrets.API_CLIENT_SECRET_MODELICA }}
CLIENT_ID_3rd: ${{ secrets.API_CLIENT_ID_MODELICA_3RDPARTY }}
CLIENT_SECRET_3rd: ${{ secrets.API_CLIENT_SECRET_MODELICA_3RDPARTY }}
CLIENT_ID_dep: ${{ secrets.API_CLIENT_ID_MODELICA_DEPRECATED }}
CLIENT_SECRET_dep: ${{ secrets.API_CLIENT_SECRET_MODELICA_DEPRECATED }}
run: python .github/list_repos.py
- name: Commit libraries list
run: |
mv ./impact-libraries.html ./static/impact-libraries.html
git config --local user.email "webmaster@modelica.org"
git config --local user.name "Modelica Association Webmaster"
git add ./static/impact-libraries.html
git diff --cached --exit-code >/dev/null || git commit -m "Updating the list of libraries"
- name: Install SSH Client 🔑
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
ssh: true