Skip to content

Commit

Permalink
added files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukund-Tandon committed Feb 18, 2024
1 parent e4f3c70 commit d28d386
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
22 changes: 11 additions & 11 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ runs:
run: sudo apt-get install jq
shell: bash

# - name: Fetch public key
# id: fetch_key
# run: |
# RESPONSE=$(curl -L \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer ${{ inputs.github_api_token }}" \
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/repos/${{ github.repository }}/actions/secrets/public-key)
# KEY=$(echo "$RESPONSE" | jq -r '.key')
# echo "PUBLIC_KEY=$KEY" >> $GITHUB_ENV
# shell: bash
- name: Fetch public key
id: fetch_key
run: |
RESPONSE=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ inputs.github_api_token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/secrets/public-key)
KEY=$(echo "$RESPONSE" | jq -r '.key')
echo "PUBLIC_KEY=$KEY" >> $GITHUB_ENV
shell: bash

- name: Set Environment Variable
run: |
Expand Down
6 changes: 5 additions & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ def getBlogFromFilePath(file_paths):


def checkBlogStatus(blog,blog_ids):
script_dir = os.path.dirname(os.path.realpath(__file__))

# Construct the absolute path to the JSON file
blog_ids_file = os.path.join(script_dir, '..', 'blog_ids.json')
blog_status = BlogStatus()
with open('blog_ids.json', 'r') as file:
with open(blog_ids_file, 'r') as file:
blog_ids_json = json.load(file)
print(f"Blog IDs JSON: {blog_ids_json}")
list_of_blog_ids = blog_ids_json['ids']
Expand Down

0 comments on commit d28d386

Please sign in to comment.