extract #23063
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: extract | |
on: | |
push: | |
branches: | |
- "*" | |
schedule: | |
- cron: '30 * * * *' | |
jobs: | |
extract: | |
name: extract | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: skip me | |
shell: bash -l {0} | |
if: success() && contains(github.event.head_commit.message, 'ci skip') | |
run: | | |
echo "commit message: '${MSG}'" | |
echo "CI_SKIP=true" >> $GITHUB_ENV | |
env: | |
MSG: ${{ github.event.head_commit.message }} | |
- uses: actions/checkout@v2 | |
if: success() && ! env.CI_SKIP | |
- uses: conda-incubator/setup-miniconda@v2 | |
if: success() && ! env.CI_SKIP | |
with: | |
python-version: 3.9 | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
- name: install | |
shell: bash -l {0} | |
if: success() && ! env.CI_SKIP | |
run: | | |
conda install pip -y | |
# We need things from libcflib | |
git clone --depth=1 https:///github.com/regro/libcflib | |
pushd libcflib | |
pip install --no-deps . | |
conda install --file requirements/run.txt -y | |
popd | |
rm -rf libcflib | |
# Install the exporter | |
git clone --depth=1 https:///github.com/symbol-management/symbol-exporter | |
pushd symbol-exporter | |
pip install --no-deps . | |
conda install --file requirements/run.txt -y | |
popd | |
- name: extract_symbols | |
shell: bash -l {0} | |
if: success() && ! env.CI_SKIP | |
run: | | |
python -m symbol_exporter.api_match_audit | |
- name: list files | |
shell: bash -l {0} | |
if: success() && ! env.CI_SKIP | |
run: | | |
python -c "import json; import glob; json.dump(glob.glob('**/*.json', recursive=True), open('.file_listing.json', 'w'), indent=2)" | |
- name: report diff | |
shell: bash -l {0} | |
if: success() && ! env.CI_SKIP | |
run: | | |
git add . | |
git diff | |
- name: commit changes | |
shell: bash -l {0} | |
if: success() && ! env.CI_SKIP | |
run: | | |
git config user.name circleci | |
git config user.email [email protected] | |
git commit -m "Updated symbols" | |
- name: push changes | |
shell: bash -l {0} | |
if: success() && ! env.CI_SKIP | |
run: | | |
git push |