Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

update-filters

update-filters #24096

name: update-filters
on:
schedule:
- cron: "30 * * * *"
workflow_dispatch: null
jobs:
update-filters:
name: update-filters
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- name: install micromamba
uses: mamba-org/provision-with-micromamba@main
- name: configure git and install code
shell: bash -l {0}
run: |
python -m pip install -e .
git config --global pull.rebase false
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
- name: generate filters
shell: bash -l {0}
run: |
conda-forge-generate-validate-yamls
- name: generate token
if: ${{ ! cancelled() && ! steps.turnstyle.outputs.force_continued }}
id: generate_token
uses: conda-forge/github-app-token@e3ab451d57e120b956292a1fa1d21fe4ba171c36
with:
app_id: ${{ secrets.CF_CURATOR_APP_ID }}
private_key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
- name: push
shell: bash -l {0}
run: |
repo_url=https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git remote set-url --push origin ${repo_url}
git add generated_validate_yamls/.
git commit --allow-empty -m "[ci skip] filter data for https://github.com/conda-forge/artifact-validation/actions/runs/${RUN_ID}"
for _ in `seq 0 1`; do
git pull
git push
done
env:
RUN_ID: ${{ github.run_id }}
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: bump on fail
shell: bash -l {0}
if: github.ref == 'refs/heads/main' && failure()
run: |
conda-forge-bump-on-fail \
--job-name=${ACTION_NAME} \
--job-url="https://github.com/conda-forge/artifact-validation/actions/runs/${RUN_ID}"
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
RUN_ID: ${{ github.run_id }}
ACTION_NAME: ${{ github.workflow }}