Skip to content

Commit

Permalink
Test previous workflow 4
Browse files Browse the repository at this point in the history
  • Loading branch information
adityalifi committed Feb 13, 2025
1 parent 5852996 commit 7c96c02
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,32 @@ 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}"
# 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: 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
# - name: Build and push Docker image
# uses: docker/build-push-action@v5 # Updated to latest version
# with:
# context: .
Expand Down

0 comments on commit 7c96c02

Please sign in to comment.