Daily Post Image from Upsplash

March: 26

Notes

2024

Action

There seems to be a couple different errors within the pipeline that need to be resolved, the first one is the file change hashes not triggering the right jobs and the second is the expo build.

I am going to remove the LCA build from the ci-main, saving it here below for reference.


    # Expo Deployments
    lc-agents-expo-deployment:
        needs: ["alter", "deploy"]
        name: Build Expo Web LC Agents
        runs-on: ubuntu-latest
        # permissions:
        #     id-token: write
        #     contents: write
        #     packages: write
        #     issues: write
        #     pull-requests: write
        steps:
            -   name: Checkout Repository
                uses: actions/checkout@v4

            -   name: Setup Node v18
                uses: actions/setup-node@v3
                with:
                    node-version: 18
            
            -   name: Setup pnpm
                uses: pnpm/action-setup@v3
                with:
                    version: 8
                    run_install: false

            -   name: Get pnpm Store Path
                shell: bash
                run: |
                    echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

            -   name: Setup pnpm Cache
                uses: actions/cache@v3
                with:
                    path: ${{ env.STORE_PATH }}
                    key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
                    restore-keys: |
                        ${{ runner.os }}-pnpm-store-
            
            -   name: Install pnpm dependencies
                run: pnpm install

           # -   name: LCA Expo Build

            -   name: LCA Expo Build
                uses: ./.github/actions/kbve-shell
                with:
                    flag: '-nx expo-lcagents:export'
                    create_pull_request: false
                    github_token: ${{ secrets.GITHUB_TOKEN }}

            
            -   name: LC Agents -> Deployment
                uses: dobbelina/copy_file_to_another_repo_action@main
                env:
                    API_TOKEN_GITHUB: ${{ secrets.UNITY_PAT }}
                with:
                    source_file: 'dist/apps/expo-lcagents/'
                    destination_repo: 'kbve/lc-agents.com'
                    destination_folder: '/docs'
                    destination_branch: 'main'
                    destination_branch_create: 'patch-kbve-lcagents-deploy'
                    user_email: '[email protected]'
                    user_name: 'h0lybyte'
                    commit_message: ${{ github.event.head_commit.message }}
                    rsync_option: "-avrh --delete"
        

    # [EXPO] -> [END]


After removing it from the ci-main, I am going to work on it within the ci-alpha, this way we should not have any issues with the main branch failing.

Here is our current ci-alpha.yml configuration for the Github Action to build the web part of the expo.


        
        expo-lcagents-web-build:
            needs: ['alter']
            name: Expo LC Agents We Build
            runs-on: ubuntu-latest
            # if: needs.alter.outputs.expolcagents == 'true'
            steps:
                -   name: Checkout repository
                    uses: actions/checkout@v4

                -   name: Setup NodeJS
                    uses: actions/setup-node@v3
                    with:
                        node-version: 18

                -   name: Setup PNPM
                    uses: pnpm/action-setup@v3
                    with:
                        version: 8
                        #run_install: false

                
                -   name: LCA Expo Build
                    uses: ./.github/actions/kbve-shell
                    with:
                        flag: '-nx expo-lcagents:export'
                        create_pull_request: false
                        github_token: ${{ secrets.GITHUB_TOKEN }}


We will push this through and see where the action goes from here!

Ah it seems that by default, the pnpm/action-setup@v3 does not run the install, so we will go ahead and put that command back in. Now the question would be if we want to pass the node-linker as a varible or not.

Let me see if I can add something that might be missing from the Github Actions?


 
                -   name: Install react-native-cli globally
                    run: pnpm add -g react-native-cli
                      
                -   name: Install dependencies
                    run: pnpm install

                -   name: Clear Metro Cache
                    run: npx react-native start --reset-cache
                

We will try this next! Hopefully this might solve the issue with the automated builds within the pipeline.