Skip to content

Commit

Permalink
secrets! please squash this
Browse files Browse the repository at this point in the history
  • Loading branch information
zetavg committed Jan 18, 2025
1 parent 8e872ce commit c54879d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-ios-test-container-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ env:
# The command used to prebuild the app
prebuild_command: yarn prebuild:native --platform ios --no-install # --no-install is used to skip installing dependencies, specifically `pod install` as we want to do it after the Cache Pods step

# TODO: MOVE THESE TO SECRETS
KV_STORE_REDIS_REST_URL: https://quiet-eel-55292.upstash.io
KV_STORE_REDIS_REST_TOKEN: Adf8AAIjcDFjODMxYTJiNDk2Nzc0ZTQwOTA5ZWJmZDU3OWZmZWI2OHAxMA
# These should be set in the repository secrets
# Redis database used for caching and remembering things between runs, such as the last build number
# KV_STORE_REDIS_REST_URL:
# KV_STORE_REDIS_REST_TOKEN:
on:
workflow_call:
inputs:
Expand Down Expand Up @@ -80,8 +81,8 @@ jobs:
- name: Read Cached Build Hash
id: get-build-hash-from-cache
env:
KV_STORE_REDIS_REST_URL: ${{ env.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ env.KV_STORE_REDIS_REST_TOKEN }}
KV_STORE_REDIS_REST_URL: ${{ secrets.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ secrets.KV_STORE_REDIS_REST_TOKEN }}
run: |
BUILD_HASH_FROM_CACHE=$(curl "$KV_STORE_REDIS_REST_URL/get/${{ env.app_id }}-build-hash-from-pre-build-hash-${{ steps.calculate-pre-build-hash.outputs.pre_build_hash }}" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN" | jq -r '.result')
Expand Down Expand Up @@ -149,6 +150,9 @@ jobs:
- name: Write Build Hash
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
env:
KV_STORE_REDIS_REST_URL: ${{ secrets.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ secrets.KV_STORE_REDIS_REST_TOKEN }}
run: |
curl -X POST "$KV_STORE_REDIS_REST_URL/SETEX/${{ env.app_id }}-build-hash-from-pre-build-hash-${{ steps.calculate-pre-build-hash.outputs.pre_build_hash }}/2592000/${{ steps.calculate-build-hash.outputs.build_hash }}" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN" # Save and set TTL to 30 days
Expand Down

0 comments on commit c54879d

Please sign in to comment.