Skip to content

Update members.json (#170) #81220

Update members.json (#170)

Update members.json (#170) #81220

Workflow file for this run

name: Maintain Webring
'on':
push:
branches:
- main
workflow_dispatch:
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
token: '${{ secrets.GITHUB_TOKEN }}'
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Run webring maintainance
run: |
pnpm install
pnpm maintain
- name: Check if remote exists
run: |
output=$(git ls-remote --heads origin refs/heads/auto-maintain-branch)
if [ -z "$output" ]; then
echo "Branch does not exists"
else
echo "Deleting the branch"
git push origin --delete --force auto-maintain-branch #Deletes the branch if it exists to avoid conflicts
fi
- name: Commit files & Merge
run: >
git config --local user.email
"41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout -b auto-maintain-branch
git add .
if git diff-index --quiet HEAD --; then # checks if there are
differences between the branches
echo "No changes to commit."
else
git commit -m "Maintain Webring"
git push origin auto-maintain-branch
echo "Changes were committed."
gh pr create --title "Maintain Webring" --body "Maintain Webring" --base main --head auto-maintain-branch
gh pr merge auto-maintain-branch --squash --auto --delete-branch --subject "Maintain Webring" --body "Maintain Webring"
fi
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'