forked from Sarjuuk/aowow
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add revision to wowgaming/aowow homepage automatically
- Loading branch information
Showing
1 changed file
with
18 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,28 +16,27 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
curl --user wowgaming:${{ secrets.FTP_PASSWORD }} ftp://[email protected]/aowow/template/pages/home.tpl.php >> home.tpl.php | ||
git clone https://github.com/azerothcore/acore-docker | ||
cd acore-docker | ||
docker compose up -d | ||
file_path="home.tpl.php" | ||
new_commit="NEWCOMMIT" | ||
target_text="AzerothCore rev: <a href=\"https:\/\/github.com\/azerothcore\/azerothcore-wotlk\/commit\/" | ||
replacement_text=" AzerothCore rev: <a href=\"https:\/\/github.com\/azerothcore\/azerothcore-wotlk\/commit\/$new_commit\">$new_commit<\/a>" | ||
sed -i "/$target_text/c\\$replacement_text" "$file_path" | ||
curl --user wowgaming:${{ secrets.FTP_PASSWORD }} --upload-file home.tpl.php ftp://[email protected]/aowow/template/pages/home.tpl.php | ||
cd ../setup/ | ||
bash generate-db.sh | ||
# git clone https://github.com/azerothcore/acore-docker | ||
# cd acore-docker | ||
# docker compose up -d | ||
cd .. | ||
# cd ../setup/ | ||
revision=`mysql -u root -ppassword -P 63306 -h 127.0.0.1 -s -N -e "SELECT substring_index(substring_index(revision, 'rev. ', -1), '+ 2', 1) FROM acore_auth.uptime ORDER BY starttime DESC LIMIT 1;"` | ||
release_name=$(date '+%Y-%m-%d_%H-%M-%S') | ||
gh release create $release_name --title "$release_name" --notes "Revision: [$revision](https://github.com/azerothcore/azerothcore-wotlk/commit/$revision)" | ||
gh release upload $release_name "aowow_db.sql.zip" | ||
# bash generate-db.sh | ||
curl --user wowgaming:${{ secrets.FTP_PASSWORD }} ftp://[email protected]/aowow/template/pages/home.tpl.php >> home.tpl.php | ||
file_path="home.tpl.php" | ||
target_text="AzerothCore rev: <a href=\"https:\/\/github.com\/azerothcore\/azerothcore-wotlk\/commit\/" | ||
replacement_text=" AzerothCore rev: <a href=\"https:\/\/github.com\/azerothcore\/azerothcore-wotlk\/commit\/$revision\">$revision<\/a>" | ||
# cd .. | ||
sed -i "/$target_text/c\\$replacement_text" "$file_path" | ||
# revision=`mysql -u root -ppassword -P 63306 -h 127.0.0.1 -s -N -e "SELECT substring_index(substring_index(revision, 'rev. ', -1), '+ 2', 1) FROM acore_auth.uptime ORDER BY starttime DESC LIMIT 1;"` | ||
# release_name=$(date '+%Y-%m-%d_%H-%M-%S') | ||
# gh release create $release_name --title "$release_name" --notes "Revision: [$revision](https://github.com/azerothcore/azerothcore-wotlk/commit/$revision)" | ||
# gh release upload $release_name "aowow_db.sql.zip" | ||
curl --user wowgaming:${{ secrets.FTP_PASSWORD }} --upload-file home.tpl.php ftp://[email protected]/aowow/template/pages/home.tpl.php |