Skip to content

Cant update gitsubmodule #2225

@jnsousaa

Description

@jnsousaa

Option 1 wasnt working, had to change to option 2

(1)

steps:
      - name: Setup SSH key for submodule access
        uses: webfactory/[email protected]
        with:
          ssh-private-key: ${{ secrets.SERVICE_FINERGE_DATA_INFRA_SSH_KEY }}
    
      - uses: actions/checkout@v4
         with:
            submodules: true    

(2)

steps:
      - name: Setup SSH key for submodule access
        uses: webfactory/[email protected]
        with:
          ssh-private-key: ${{ secrets.SERVICE_FINERGE_DATA_INFRA_SSH_KEY }}

      # Checkout main repository without submodules first
      - uses: actions/checkout@v4
        with:
          submodules: false

      # Configure Git to use SSH instead of HTTPS for GitHub, then initialize submodules
      # This prevents GitHub Actions from rewriting SSH URLs to HTTPS
      - name: Initialize and update submodules with SSH
        run: |
          git config --global url."[email protected]:".insteadOf "https://github.com/"
          git submodule update --init --recursive

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions