Update SDE to latest #4
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
name: Update SDE to latest | |
on: | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Script | |
run: | | |
OLDVERS=$(cat sde.json | grep -E -o "([0-9]{8}-TRANQUILITY)" | uniq) | |
NEWVERS=$(curl -s https://www.fuzzwork.co.uk/dump/latest/ | grep -E -o "([0-9]{8}-TRANQUILITY)" | uniq) | |
echo "$OLDVERS -> $NEWVERS" | |
sed -i "s/$OLDVERS/$NEWVERS/g" ./tools/generate_sde_json.php | |
sed -i "s/$OLDVERS/$NEWVERS/g" sde.json | |
git config --local user.name ${{ github.actor }} | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
VERS=$(cat sde.json | grep -E -o "([0-9]{8}-TRANQUILITY)" | uniq) | |
git add sde.json ./tools/generate_sde_json.php | |
git diff --exit-code || git commit -m "Update SDE to $VERS" | |
git push |