Skip to content

Major bug fix for Nohzdyve and updated from v1.0 to v1.3 for Ardumania in the .ini #33

Major bug fix for Nohzdyve and updated from v1.0 to v1.3 for Ardumania in the .ini

Major bug fix for Nohzdyve and updated from v1.0 to v1.3 for Ardumania in the .ini #33

name: update-collection
permissions:
contents: write
on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
update-collection:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3 # Update to v3 for Node.js 20 support
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4' # specify the PHP version
- name: Create config.php
working-directory: docs/updater
run: |
echo '<?php' > config.php
echo '// Configuration' >> config.php
echo "\$server = 'https://raw.githubusercontent.com/';" >> config.php
echo "\$repopath = 'eried/ArduboyCollection/'; // Source repository" >> config.php
echo '' >> config.php
echo '// Github credentials' >> config.php
echo "\$client_id='${{ secrets.CLIENT_ID }}';" >> config.php
echo "\$client_secret='${{ secrets.CLIENT_SECRET }}';" >> config.php
- name: Execute update.php
working-directory: docs/updater
run: php update.php
- name: Commit and Push changes
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add repo.json
git add index.html
git commit -m "Repo update" -a || echo "No changes to commit"
#git push https://${{ secrets.PAT }}@github.com/eried/ArduboyCollection.git
git push