Update address_rename.py #297
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: Convert to Base64 | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Run script to rename address | |
run: | | |
python StarStruck/Realm_rename.py | |
- name: Check for Renamed Changes | |
id: changesRealmRename | |
run: | | |
git diff --quiet && echo 'No changes' || echo '::set-output name=changed::true' | |
- name: Commit and Push Renamed | |
if: steps.changesRealmRename.outputs.changed == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add Realm | |
timestamp=$(TZ='Asia/Tehran' date) | |
git commit -m "✅Updated on ${timestamp}" | |
git push | |
- name: Convert Realm to base64 | |
run: | | |
content=$(cat Realm | base64 | tr -d '\n') | |
echo "$content" > Raw | |
- name: Check for Base64 Changes | |
id: changes64 | |
run: | | |
git diff --quiet && echo 'No changes' || echo '::set-output name=changed::true' | |
- name: Commit and Push Base64 | |
if: steps.changes64.outputs.changed == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add Raw | |
timestamp=$(TZ='Asia/Tehran' date) | |
git commit -m "✅Updated on ${timestamp}" | |
git push | |
- name: Run script to rename address | |
run: | | |
python StarStruck/address_rename.py | |
- name: Check for Renamed Changes | |
id: changesRenamed | |
run: | | |
git diff --quiet && echo 'No changes' || echo '::set-output name=changed::true' | |
- name: Commit and Push Renamed | |
if: steps.changesRenamed.outputs.changed == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add StarStruck/StarRenamed | |
timestamp=$(TZ='Asia/Tehran' date) | |
git commit -m "✅Updated on ${timestamp}" | |
git push | |
- name: Convert StarRenamed to base64 | |
run: | | |
content=$(cat StarStruck/StarRenamed | base64 | tr -d '\n') | |
echo "$content" > StarStruck/Star64 | |
- name: Check for Renamed Base64 Changes | |
id: changesS | |
run: | | |
git diff --quiet && echo 'No changes' || echo '::set-output name=changed::true' | |
- name: Commit and Push Renamed Base64 | |
if: steps.changesS.outputs.changed == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add StarStruck/Star64 | |
timestamp=$(TZ='Asia/Tehran' date) | |
git commit -m "✅Updated on ${timestamp}" | |
git push |