Skip to content

Commit c592ad1

Browse files
committed
check if queryable
1 parent 26608ff commit c592ad1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/_publish-data-platform-data-diff.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,20 @@ jobs:
5151
path: .venv
5252
key: ${{ inputs.python_cache_key }}
5353

54+
- name: Install jq
55+
run: sudo apt-get update && sudo apt-get install -y jq
56+
57+
- name: Check if AWS CodeArtifact is queryable and count repositories
58+
env:
59+
AWS_REGION: ${{ secrets.AWS_REGION }}
60+
run: |
61+
repo_count=$(aws codeartifact list-repositories --region $AWS_REGION --output json | jq '.repositories | length' 2>/dev/null) || { echo "Failed to query AWS CodeArtifact or an error occurred."; exit 0; }
62+
echo "Number of repositories in AWS CodeArtifact: $repo_count"
63+
5464
- name: Set env variables
5565
env:
5666
AWS_REGION: ${{ secrets.AWS_REGION }}
57-
CODEARTIFACT_URL: ${{ secrets.CODEARTIFACT_URL }} # Add your CodeArtifact URL as a secret
67+
CODEARTIFACT_URL: ${{ secrets.CODEARTIFACT_URL }}
5868
run: |
5969
# Replace placeholder URL with actual repository URL
6070
sed -i "s|PLACEHOLDER_URL|$CODEARTIFACT_URL|" pyproject.toml

0 commit comments

Comments
 (0)