mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
Update logo.yml
This commit is contained in:
parent
2e43b1d097
commit
e7819734ec
1 changed files with 28 additions and 0 deletions
28
.github/workflows/logo.yml
vendored
28
.github/workflows/logo.yml
vendored
|
@ -6,6 +6,34 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
name: Check out code
|
||||
|
||||
- name: update logo
|
||||
run: |
|
||||
files=$(ls appmanage/static/images)
|
||||
for file in $files;do
|
||||
app=$(echo ${file%%-*})
|
||||
echo $app
|
||||
entry=$(curl --include \
|
||||
--request GET \
|
||||
--header 'Authorization: Bearer ${{secrets.CONTENTFUL}}' \
|
||||
https://api.contentful.com/spaces/wbgvl9e8pqe2/environments/master/entries?content_type=media\&fields.slug=${app} | tail -n 1)
|
||||
echo $entry
|
||||
data=$(echo $entry | jq -r '.items[0].fields.imageurl')
|
||||
if [[ "$data" == null ]];then
|
||||
continue
|
||||
fi
|
||||
url=$(echo $data | sed 's/en-US/en/' | jq -r '.en')
|
||||
echo $url
|
||||
wget -P appmanage/static/images $url
|
||||
done
|
||||
|
||||
- name: push logo
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: update logo
|
||||
|
|
Loading…
Reference in a new issue