diff options
-rw-r--r-- | .github/workflows/build-submit-android.yml | 1 | ||||
-rw-r--r-- | .github/workflows/build-submit-ios.yml | 1 | ||||
-rw-r--r-- | .github/workflows/bundle-deploy-eas-update.yml | 5 | ||||
-rw-r--r-- | .github/workflows/sync-internal.yaml | 31 |
4 files changed, 36 insertions, 2 deletions
diff --git a/.github/workflows/build-submit-android.yml b/.github/workflows/build-submit-android.yml index f75c95052..e862a701f 100644 --- a/.github/workflows/build-submit-android.yml +++ b/.github/workflows/build-submit-android.yml @@ -13,6 +13,7 @@ on: jobs: build: + if: github.repository == 'bluesky-social/social-app' name: Build and Submit Android runs-on: ubuntu-latest steps: diff --git a/.github/workflows/build-submit-ios.yml b/.github/workflows/build-submit-ios.yml index dd7c5f85b..a197695db 100644 --- a/.github/workflows/build-submit-ios.yml +++ b/.github/workflows/build-submit-ios.yml @@ -13,6 +13,7 @@ on: jobs: build: + if: github.repository == 'bluesky-social/social-app' name: Build and Submit iOS runs-on: macos-15 steps: diff --git a/.github/workflows/bundle-deploy-eas-update.yml b/.github/workflows/bundle-deploy-eas-update.yml index 5a4702f96..475bc087f 100644 --- a/.github/workflows/bundle-deploy-eas-update.yml +++ b/.github/workflows/bundle-deploy-eas-update.yml @@ -20,6 +20,7 @@ on: jobs: bundleDeploy: + if: github.repository == 'bluesky-social/social-app' name: Bundle and Deploy EAS Update runs-on: ubuntu-latest concurrency: @@ -150,7 +151,7 @@ jobs: needs: [bundleDeploy] # Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be # available here - if: ${{ inputs.channel != 'production' && needs.bundleDeploy.outputs.changes-detected }} + if: ${{ inputs.channel != 'production' && needs.bundleDeploy.outputs.changes-detected && github.repository == 'bluesky-social/social-app' }} steps: - name: Check for EXPO_TOKEN run: > @@ -239,7 +240,7 @@ jobs: needs: [bundleDeploy] # Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be # available here - if: ${{ inputs.channel != 'production' && needs.bundleDeploy.outputs.changes-detected }} + if: ${{ inputs.channel != 'production' && needs.bundleDeploy.outputs.changes-detected && github.repository == 'bluesky-social/social-app'}} steps: - name: Check for EXPO_TOKEN diff --git a/.github/workflows/sync-internal.yaml b/.github/workflows/sync-internal.yaml new file mode 100644 index 000000000..b50d6bc51 --- /dev/null +++ b/.github/workflows/sync-internal.yaml @@ -0,0 +1,31 @@ +name: Sync to internal repo + +on: + push: + branches: [main] + +jobs: + sync: + runs-on: ubuntu-latest + if: github.repository == 'bluesky-social/social-app' + steps: + - name: Checkout public repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.SYNC_INTERNAL_APP_ID }} + private-key: ${{ secrets.SYNC_INTERNAL_PK }} + repositories: social-app-internal + - name: Push to internal repo + env: + TOKEN: ${{ steps.app-token.outputs.token }} + run: | + git config user.name "github-actions" + git config user.email "test@users.noreply.github.com" + git config --unset-all http.https://github.com/.extraheader + git remote add internal https://x-access-token:${TOKEN}@github.com/bluesky-social/social-app-internal.git + git push internal main --force |