update_cec_list.bash: corrections to work with gitea actions
Some checks failed
Push commit / report (push) Failing after 3s
Some checks failed
Push commit / report (push) Failing after 3s
This commit is contained in:
parent
c874a29c5a
commit
b6b4d7cb74
@ -1,7 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
cd ~/CEC_monitoring || { exit 1; echo "changing directory failed"; exit 1; }
|
||||
|
||||
http_response=$(curl -s -L -o list.csv -w "%{http_code}" "https://docs.google.com/spreadsheets/d/e/2PACX-1vTXE8HCavThmJt1Wshy3GyF2ZJ-264SbNRVucsPUe2rbEgpm-e3tqsX-8K2mwsG4ozBj6qUyOOd4RMe/pub?gid=1832580214&single=true&output=csv")
|
||||
if [ $http_response != "200" ]; then
|
||||
#echo "page not found"
|
||||
@ -10,18 +8,12 @@ if [ $http_response != "200" ]; then
|
||||
exit 1
|
||||
|
||||
else
|
||||
git config user.name 'user2'
|
||||
git config user.email 'user2@localhost'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@gitea.demb.uk/$GITHUB_REPOSITORY
|
||||
git diff "list.csv"
|
||||
git diff "list.csv" | python3 stdin2discord.py
|
||||
git add "list.csv"
|
||||
git commit -m "commit" 2>/dev/null >/dev/null
|
||||
git push 2>/dev/null
|
||||
git commit -m "commit"
|
||||
git push
|
||||
fi
|
||||
|
||||
#curl -L -o "list.csv" -s "https://docs.google.com/spreadsheets/d/e/2PACX-1vTXE8HCavThmJt1Wshy3GyF2ZJ-264SbNRVucsPUe2rbEgpm-e3tqsX-8K2mwsG4ozBj6qUyOOd4RMe/pub?gid=1832580214&single=true&output=csv" || { echo "downloading failed"; exit 1; }
|
||||
|
||||
#git diff "list.csv"
|
||||
#git add "list.csv"
|
||||
#git commit -m "commit" | grep -vE 'On branch master|nothing to commit, working tree clean'
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user