Skip to content

cp_create_generic_data_center #13240

cp_create_generic_data_center

cp_create_generic_data_center #13240

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: cp_create_generic_data_center
# Controls when the workflow will run
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "15 * * * *"
# 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:
# Set timeout for the entire job
timeout-minutes: 3
# 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@main
- name: setup python 3.10
uses: actions/setup-python@main
with:
python-version: '3.10' #install the python needed
- name: install requirements
run: pip install -r requirements.txt
- name: execute main.py script # run the run.py to get the latest data
run: python main.py
- name: Commit cdns.json back to repo
run: |
git config --global user.name ${{ secrets.GH_USER }}
git config --global user.email "${{ secrets.GH_MAIL }}"
git add cdns.json
git add dynamic_objects.txt
if ! git diff-index --quiet HEAD; then
git commit -m "Create/Update outputs"
git push
fi