48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Process Apps and Commit Changes
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- appstore
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
process:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pyyaml
|
|
|
|
- name: Run processing script
|
|
run: python process-apps.py
|
|
|
|
- name: Check for changes
|
|
id: check_changes
|
|
run: |
|
|
git diff --exit-code || echo "Changes detected."
|
|
|
|
- name: Configure Git
|
|
if: steps.check_changes.outcome != 'success'
|
|
run: |
|
|
git config --global user.name "${{ github.actor }}"
|
|
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
|
|
|
- name: Commit and push changes
|
|
if: steps.check_changes.outcome != 'success'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git add .
|
|
git commit -m "Processed apps directory via GitHub Actions"
|
|
git push origin appstore
|