Skip to content

update

update #4

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: Download icons
run: |
wget \
--quiet \
--output-document=aws-icons.zip \
https://d1.awsstatic.com/webteam/architecture-icons/q1-2024/Asset-Package_02062024.c893ec2a2df5a0b881da3ad9a3213e5f6c8664d4.zip
- name: Unzip icons
run: |
mkdir -p docs/images
unzip -o aws-icons.zip -d docs/images "**/*.svg"
# get rid of dates in the directory names
mv docs/images/Architecture-Group-Icons_* docs/images/Architecture-Group-Icons
mv docs/images/Architecture-Service-Icons_* docs/images/Architecture-Service-Icons
mv docs/images/Category-Icons_* docs/images/Category-Icons
mv docs/images/Resource-Icons_* docs/images/Resource-Icons
# macos junk
rm -rf docs/images/__MACOSX
# why are there different sizes of scalable icons???
rm -rf docs/images/Category-Icons/Arch-Category_16
rm -rf docs/images/Category-Icons/Arch-Category_32
rm -rf docs/images/Category-Icons/Arch-Category_48
# cleanup zip file
rm aws-icons.zip
git add docs/images/*.svg
- name: Install SSH Client
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Prepare git and github
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
git remote add deploy [email protected]:AwesomeLogos/aws-icons.git
git checkout main
- name: Commit changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git commit -am "Update icons"
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