Skip to content

Checkout #21

@jngls

Description

@jngls

The readme states:

Use the actions/checkout step before this action to clone your repository into the GitHub Actions runner.

How are you guys convincing UnrealEngine to checkout? I'm having real trouble. I have it as a submodule in my repo. My account has access to the UnrealEngine repo. I have a PAT with Contents "ReadOnly" and secret which I've hooked up in my workflow.

Apologies for the question here. I realise it's not 100% the right place, but the only person asking about github actions on the UE forums has no replies, and I figured you must have gotten it working.

name: Windows Editor
on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: windows-latest
    steps:
      - name: Debug token access
        run: |
          curl -H "Authorization: token ${{ secrets.GH_PAT }}" https://api.github.com/repos/EpicGames/UnrealEngine

      - name: Checkout main repository (no submodules)
        uses: actions/checkout@v4
        with:
          fetch-depth: 1
          lfs: true
          token: ${{ secrets.GH_PAT }}

      - name: Extract UE commit from submodule
        id: ue-ref
        run: |
          echo "ue_sha=$(git ls-tree HEAD UnrealEngine | awk '{print $3}')" >> $GITHUB_OUTPUT

      - name: Checkout UnrealEngine
        uses: actions/checkout@v4
        with:
          repository: EpicGames/UnrealEngine
          ref: ${{ steps.ue-ref.outputs.ue_sha }}
          path: UnrealEngine
          fetch-depth: 1
          token: ${{ secrets.GH_PAT }}

      - name: Build Editor
        uses: OrchidIsle/UE5-Build-Project@latest
        with:
          RUNUAT_PATH: '${{ github.workspace }}/UnrealEngine/Engine/Build/BatchFiles/RunUAT.bat'
          UPROJECT_PATH: '${{ github.workspace }}/MyProject/MyProject.uproject'
          BUILD_CONFIG: DebugGame
          PLATFORM: Win64
          EDITOR: true

I was not able to get it to check out with submodules: true/recursive, so I had to split it into two steps; Checkout main repository (no submodules) and Checkout UnrealEngine. Even without the Extract UE commit from submodule, I get the same issue.

Debug token access is showing:

{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/repos/repos#get-a-repository",
  "status": "404"
}

The UnrealEngine checkout step returns (PAT redacted):

Setting up auth
  "C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp core\.sshCommand
  "C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "sh -c \"git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :\""
  "C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  "C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "sh -c \"git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :\""
  "C:\Program Files\Git\bin\git.exe" config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ***"

Determining the default branch
  Retrieving the default branch name
  Not Found - https://docs.github.com/rest/repos/repos#get-a-repository
  Waiting 15 seconds before trying again
  Retrieving the default branch name
  Not Found - https://docs.github.com/rest/repos/repos#get-a-repository
  Waiting 15 seconds before trying again
  Retrieving the default branch name
  Error: Not Found - https://docs.github.com/rest/repos/repos#get-a-repository

So I ran this locally (PAT redacted):

git clone https://***@github.com/EpicGames/UnrealEngine.git
Cloning into 'UnrealEngine'...
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/EpicGames/UnrealEngine.git/': The requested URL returned error: 403

What strategies are you using to checkout/build?

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