Skip to content

Commit

Permalink
Test previous workflow 3
Browse files Browse the repository at this point in the history
  • Loading branch information
adityalifi committed Feb 13, 2025
1 parent 6c9e940 commit 5852996
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,30 @@ jobs:
type=ref,event=branch
type=ref,event=branch,prefix=${{ env.UNIQ_ID }}-
- name: Access and Verify GCP Secrets
id: secrets
run: |
echo "Fetching secret from jumper-d-dev project..."
SECRET_VALUE=$(gcloud secrets versions access latest --secret="jumper-exchange-env" --project="jumper-d-dev")
if [ $? -eq 0 ]; then
echo "Secret retrieved successfully!"
echo "Length of secret: ${#SECRET_VALUE}"
echo "SECRET_VALUE=$SECRET_VALUE" >> $GITHUB_ENV
else
echo "Failed to retrieve secret"
exit 1
fi
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.gcpauth.outputs.credentials_file_path }}
- name: Access and Verify GCP Secrets
id: secrets
run: |
echo "Fetching secret from jumper-d-dev project..."
SECRET_VALUE=$(gcloud secrets versions access latest --secret="jumper-exchange-env" --project="jumper-d-dev")
if [ $? -eq 0 ]; then
echo "Secret retrieved successfully!"
echo "Length of secret: ${#SECRET_VALUE}"
# Validate secret format without exposing content
if [[ "$SECRET_VALUE" == *"EXPECTED_KEY="* ]]; then
echo "Secret contains expected configuration"
else
echo "Secret may be missing expected configuration"
fi
echo "SECRET_VALUE=$SECRET_VALUE" >> $GITHUB_ENV
else
echo "Failed to retrieve secret"
exit 1
fi
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.gcpauth.outputs.credentials_file_path }}
# - name: Build and push Docker image
# uses: docker/build-push-action@v5 # Updated to latest version
Expand Down

0 comments on commit 5852996

Please sign in to comment.