Skip to content

bing image

bing image #123170

Workflow file for this run

name: 'bing image'
on:
push:
schedule:
- cron: '*/10 * * * *'
jobs:
bot:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: ls
run : ls -al
- name: mozjpeg install
run: |
TEMP_DEB="$(mktemp)" &&
wget -O "$TEMP_DEB" 'https://github.com/aburrido/mozjpeg/releases/download/3.3.1/mozjpeg_3.3.1_amd64.deb' &&
sudo dpkg -i "$TEMP_DEB"
rm -f "$TEMP_DEB"
- name: Download
run: |
php bing.php de-DE
php bing.php en-AU
php bing.php en-CA
php bing.php en-GB
php bing.php en-IN
php bing.php en-US
php bing.php fr-CA
php bing.php fr-FR
php bing.php ja-JP
php bing.php zh-CN
- name: ls
run : ls -al
- name: Commit
run: |
if [ -n "$(git status -s)" ];then
langs=`git status -s | grep "..-..\.jpg" -o`
git config --global user.name 'aburrido'
git config --global user.email 'aburrido@qq.com'
git add .
git commit -m $(date +"%Y-%m-%d.%H:%M:%S")
git push
for lang in ${langs}
do
curl "https://cdn.jsdelivr.net/gh/aburrido/bing@latest/$lang" --output /dev/null
done
fi