Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

CI

CI #4556

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
schedule:
- cron: '0 * * * *'
push:
branches: [ "main" ]
# 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:
status:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Checkout CCI
uses: actions/checkout@v4
with:
repository: conan-io/conan-center-index
path: conan-center-index
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip' # caching pip dependencies
- run: |
python3 -m pip install -r requirements.txt
- name: Check patches
run: |
mkdir -p ../../pages
outfile=../../pages/index.md
echo "The following recipes have inconsistencies between the content of the 'patches' folder, and the content of conandata.yml." | tee -a $outfile $GITHUB_STEP_SUMMARY
echo "" | tee -a $outfile $GITHUB_STEP_SUMMARY
for d in */*/
do
res=$(python3 ../../lint_patches.py ${d})
if [[ -z "$res" ]]
then
continue
fi
echo "## [${d}](https://github.com/conan-io/conan-center-index/tree/master/recipes/${d})" | tee -a $outfile $GITHUB_STEP_SUMMARY
echo "${res}" | tee -a $outfile $GITHUB_STEP_SUMMARY
echo "" | tee -a $outfile $GITHUB_STEP_SUMMARY
done
working-directory: conan-center-index/recipes
- name: post github comment
env:
GH_TOKEN: ${{ secrets.ISSUE_TOKEN }}
run: |
echo "This issue lists all the inconsistencies between the patches section in conandata.yml and the patched folder." | tee body
echo "It is automatically generated by https://github.com/${GITHUB_REPOSITORY} so don't hesitate to report issues/improvements there." | tee -a body
cat pages/index.md | tee -a body
echo "" | tee -a body
echo "This can also be viewed on https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}" | tee -a body
gh issue edit ${{ vars.ISSUE_ID }} --repo conan-io/conan-center-index --body-file body
- uses: actions/upload-artifact@v4
with:
name: my-artifact
path: pages
Gather_Results:
name: Gather results
needs: [status]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: my-artifact
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
actions: read
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: Gather_Results
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4