Skip to content

update

update #15

Workflow file for this run

name: update
on:
schedule:
- cron: '42 0 * * 1'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create directory
run: mkdir -p profile
- name: Update
uses: fileformat/ghashboard@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
owners: AwesomeLogos
output: profile/README.md
private: false
exclude: ''
#title: "Awesome Logos Dashboard"
- name: Install SSH Client
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Commit changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.email "${GITHUB_REPOSITORY#*/}@${GITHUB_REPOSITORY%/*}.github.io"
git config --global user.name "${GITHUB_JOB} Github Action"
git remote add deploy git@github.com:${GITHUB_REPOSITORY}.git
git checkout main
git add profile/README.md
git commit -a -m "Self-update"
git push deploy main
else
echo "No changes to commit"
fi
- name: Notify NodePing
env:
NODEPING_CHECKTOKEN: ${{ secrets.NODEPING_CHECKTOKEN }}
NODEPING_ID: ${{ secrets.NODEPING_ID }}
if: ${{ github.event_name == 'schedule' }}
run: |
if [ "${NODEPING_CHECKTOKEN}" != "" ] && [ "${NODEPING_ID}" != "" ]; then
curl \
--silent \
--request POST \
"https://push.nodeping.com/v1?id=${NODEPING_ID}&checktoken=${NODEPING_CHECKTOKEN}"
else
echo "WARNING: nodeping not configured for update-data"
fi