name: Join Profiles permissions: contents: write on: workflow_dispatch: push: paths: - ".github/join_profiles.py" - ".github/workflows/join-profiles.yml" - "profile_sources/**" pull_request: paths: - ".github/join_profiles.py" - ".github/workflows/join-profiles.yml" - "profile_sources/**" jobs: join-profiles: runs-on: ubuntu-latest env: PYTHON_VERSION: "3.12" steps: - name: Check out repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} - name: Join Profiles run: | echo "Joining Profiles" echo " Python: $(python --version)" echo " Script: $GITHUB_WORKSPACE/.github/join_profiles.py" echo " Output: $GITHUB_WORKSPACE" rm -rf repos manifest.json python "$GITHUB_WORKSPACE/.github/join_profiles.py" echo "Profile joining finished" - name: Commit generated profiles if: github.event_name != 'pull_request' run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add manifest.json repos if git diff --cached --quiet; then echo "No generated profile changes to commit" exit 0 fi git commit -m "Update Profiles" git push