From c0b18b3293d3f8de81033acf6470327a9c3ba419 Mon Sep 17 00:00:00 2001 From: Anukkrit Shanker Date: Sat, 27 Jan 2024 18:46:44 +0530 Subject: [PATCH] Revert "Revise GitHub workflow to include build and commit steps" --- .github/workflows/validate-entry.yml | 14 +------------- .github/workflows/validate.py | 15 --------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/.github/workflows/validate-entry.yml b/.github/workflows/validate-entry.yml index 723bbced88..c335511ec5 100644 --- a/.github/workflows/validate-entry.yml +++ b/.github/workflows/validate-entry.yml @@ -7,7 +7,7 @@ on: branches: ["main"] jobs: - validate-and-build: + validate-entry: runs-on: ubuntu-latest steps: @@ -26,15 +26,3 @@ jobs: - name: Validate Entry run: python .github/workflows/validate.py - - - name: Commit Changes - run: | - git config --global user.name 'GitHub Actions' - git config --global user.email 'actions@karnot.xyz' - git add listing.json - git commit -m "Added New Entry for avail campaign" - - - name: Push Changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.TOKEN }} diff --git a/.github/workflows/validate.py b/.github/workflows/validate.py index 7b8feab58d..f775d2482d 100644 --- a/.github/workflows/validate.py +++ b/.github/workflows/validate.py @@ -5,7 +5,6 @@ import sys APP_CHAIN_DIRECTORY = os.path.join(os.getcwd(), "app_chains") -LISTING_JSON_LOC = os.path.join(os.getcwd(), "listing.json") JSON_URL = "https://raw.githubusercontent.com/karnotxyz/avail-campaign-listing/main/listing.json" TIMEOUT_IN_MS = 500 @@ -144,22 +143,8 @@ def check_duplicate_urls_in_latest_entry(): return new_entry -def append_to_json_file(data, file_path): - try: - with open(file_path, 'r+') as file: - file_data = json.load(file) - file_data.append(data) - file.seek(0) - json.dump(file_data, file, indent=4) - print(f"Data appended successfully to {file_path}") - except Exception as e: - print(f"Error in appending to file: {e}") - sys.exit(1) - - if __name__ == "__main__": latest_entry = check_duplicate_urls_in_latest_entry() if latest_entry: check_required_keys(latest_entry) check_url_status_code(latest_entry) - append_to_json_file(latest_entry, LISTING_JSON_LOC)