Skip to content

Testing rust, c++ vs python3.12 BUILD Bob Build (7) #220

Testing rust, c++ vs python3.12 BUILD Bob Build (7)

Testing rust, c++ vs python3.12 BUILD Bob Build (7) #220

Workflow file for this run

name: Sort Lists | My Privacy DNS
on:
push:
branches:
- master
jobs:
sort-lists:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install GNU parallel
run: sudo apt-get update && sudo apt-get install -y parallel
- name: Install My Privacy DNS python module
run: |
pip install --no-cache-dir -r "${{ github.workspace }}/requirements.txt"
- name: Check for changes in source folder
id: check_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^source/'; then
echo "changes=true" >> $GITHUB_ENV
else
echo "changes=false" >> $GITHUB_ENV
fi
- name: Sort source files
if: env.changes == 'true'
continue-on-error: true
run: |
python3 tools/sort_lists.py
- name: Configure Git
run: |
git config --global user.name "spirillen"
git config --global user.email "[email protected]"
git config --global --add safe.directory /github/workspace
- name: Commit changes
if: env.changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if git diff --staged --quiet; then
echo "We are good, no changes to the sources"
else
git add .
git commit -m "Sorted files"
git push
fi