Skip to content

Create feedstocks #12176

Create feedstocks

Create feedstocks #12176

name: Create feedstocks
on:
push:
branches:
- main
schedule:
- cron: '*/10 * * * *'
workflow_dispatch: null
permissions: {}
jobs:
create-feedstocks:
permissions:
contents: write # for git push
actions: read # to read runs
if: github.repository == 'conda-forge/staged-recipes'
name: Create feedstocks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ github.token }}
- name: Prevent multiple jobs running in parallel
id: conversion_lock
uses: beckermr/turnstyle-python@d50fd7e1de14639af00d8dc8e0f60176a99153d9 # v2
with:
abort-after-seconds: 3
poll-interval-seconds: 2
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: commit any changes upon checkout
run: |
git config --global user.email "[email protected]"
git config --global user.name "conda-forge-admin"
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
- name: Run feedstock creation
# outcome is evaluated before continue-on-error above
if: ${{ steps.conversion_lock.outcome == 'success' }}
run: |
# Avoid wasting CI time if there are no recipes ready for conversion
if [ "$(ls recipes/*/meta.yaml | grep -v recipes/example/meta.yaml --count)" -eq 0 ]; then
echo "No new recipes found, exiting..."
exit 0
fi
echo "Creating feedstocks from the recipe(s)."
source ./.github/workflows/scripts/create_feedstocks
env:
STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }}
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
TRAVIS_TOKEN: ${{ secrets.ORGWIDE_TRAVIS_TOKEN }}
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}