create_feedstocks #115984
This file contains hidden or 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: create_feedstocks | |
on: | |
schedule: | |
- cron: '*/10 * * * *' | |
workflow_dispatch: null | |
jobs: | |
create_feedstocks: | |
name: create feedstocks | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout staged-recipes | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: conda-forge/staged-recipes | |
token: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }} | |
path: staged-recipes | |
- name: checkout admin-requests | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: conda-forge/admin-requests | |
path: admin-requests | |
- name: prevent multiple jobs running in parallel | |
id: conversion_lock | |
uses: beckermr/turnstyle-python@8f1ceb87dabbbbebe42257b85c368f6110bb9170 # v2 | |
with: | |
abort-after-seconds: 3 | |
poll-interval-seconds: 2 | |
github-token: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: commit any changes upon checkout | |
run: | | |
pushd staged-recipes | |
git config --global user.email "[email protected]" | |
git config --global user.name "conda-forge-admin" | |
git config --global pull.rebase false | |
git add * | |
git commit -am "make sure we have no windows line endings" || exit 0 | |
for i in `seq 1 5`; do | |
git pull | |
git push | |
done | |
popd | |
- name: Run feedstock creation | |
# outcome is evaluated before continue-on-error above | |
if: ${{ steps.conversion_lock.outcome == 'success' }} | |
run: | | |
pushd staged-recipes | |
# Avoid wasting CI time if there are no recipes ready for conversion | |
# Checks for both `meta.yaml` and `recipe.yaml` files in the recipes directory | |
# Excludes the example recipe(s) | |
if [ "$(ls recipes/*/meta.yaml recipes/*/recipe.yaml 2>/dev/null | grep -vE 'recipes/example/meta.yaml|recipes/example/recipe.yaml' --count)" -eq 0 ]; then | |
echo "No new recipes found, exiting..." | |
exit 0 | |
fi | |
echo "Creating feedstocks from the recipe(s)." | |
source ../admin-requests/scripts/create_feedstocks | |
python ../admin-requests/scripts/create_feedstocks.py | |
popd | |
env: | |
STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} | |
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }} | |
TRAVIS_TOKEN: ${{ secrets.CF_ADMIN_TRAVIS_TOKEN }} | |
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} |