You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a private repo on a selfhosted forgejo with docker, and I'm having a hard time using "checkout". I cannot seem to find useful info on the net about how to use it properly on a private repo. My understanding is that this will clone the current branch in the working env of the task.
Secrets: GH_PAT is registered as a secret inside the repo with full permission.
I never used CD/CI or GH actions, so maybe the issue is quite easy to spot – can someone enlighten me ? :)
"Checkout repository code" output:
::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json
Syncing repository: repotest/mono
::group::Getting Git version info
Working directory is '/workspace/repotest/mono'
::endgroup::
Deleting the contents of '/workspace/repotest/mono'
The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive
Not found.
Waiting 15 seconds before trying again
Downloading the archive
Not found.
Waiting 16 seconds before trying again
Downloading the archive
::remove-matcher owner=checkout-git::
::error::Not found.%0A
.forgejo/workflows/test.yaml :
on:
push:
branches:
- main
pull_request:
concurrency:
cancel-in-progress: true
jobs:
build:
runs-on: docker
container:
image: node:18-alpine3.18
steps:
- run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
with:
token: "${{ secrets.GH_PAT }}"
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "The workflow is now ready to test your code on the runner."
- name: Build dependencies
run: yarn --frozen-lockfile # using alpine, this is needed no matter what (musl)
- name: Build nuxt
run: yarn workspace web build # Assuming from root, call the 'build' script from the 'web' package
Earlier I tried with v4 and I had another error as the output for that task (truncated):
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive
Verify
Waiting 13 seconds before trying again
Downloading the archive
Verify
Waiting 14 seconds before trying again
Downloading the archive
::remove-matcher owner=checkout-git::
::error::Verify%0A
"Complete job" output:
expression 'echo "The ${{ gitea.repository }} repository has been cloned to the runner."' rewritten to 'format('echo "The {0} repository has been cloned to the runner."', gitea.repository)'
evaluating expression 'format('echo "The {0} repository has been cloned to the runner."', gitea.repository)'
expression 'format('echo "The {0} repository has been cloned to the runner."', gitea.repository)' evaluated to '%!t(string=echo "The repotest/mono repository has been cloned to the runner.")'
expression '${{ secrets.GH_PAT }}' rewritten to 'format('{0}', secrets.GH_PAT)'
evaluating expression 'format('{0}', secrets.GH_PAT)'
expression 'format('{0}', secrets.GH_PAT)' evaluated to '%!t(string=***)'
setupEnv => map[ACT:true ACTIONS_CACHE_URL:http://10.89.0.47:40179/ ACTIONS_RUNTIME_TOKEN:*** ACTIONS_RUNTIME_URL:http://forgejo:3000/api/actions_pipeline/ A_TEST_ENV_NAME_1:a_test_env_value_1 A_TEST_ENV_NAME_2:a_test_env_value_2 CI:true GITEA_ACTIONS:true GITEA_ACTIONS_RUNNER_VERSION:v3.0.1 GITHUB_ACTION:3 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF:v3 GITHUB_ACTION_REPOSITORY:actions/checkout GITHUB_ACTOR:jeremy.d GITHUB_API_URL:http://forgejo:3000/api/v1 GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL: GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_OUTPUT:/var/run/act/workflow/outputcmd.txt GITHUB_PATH:/var/run/act/workflow/pathcmd.txt GITHUB_REF:refs/heads/main GITHUB_REF_NAME:main GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:repotest/mono GITHUB_REPOSITORY_OWNER:repotest GITHUB_RETENTION_DAYS: GITHUB_RUN_ID:16 GITHUB_RUN_NUMBER:16 GITHUB_SERVER_URL:http://forgejo:3000 GITHUB_SHA:f491ca0f7872f9ff8daa0080e4716ee44dd03981 GITHUB_STATE:/var/run/act/workflow/statecmd.txt GITHUB_STEP_SUMMARY:/var/run/act/workflow/SUMMARY.md GITHUB_TOKEN:*** GITHUB_WORKFLOW: GITHUB_WORKSPACE:/workspace/repotest/mono INPUT_CLEAN:true INPUT_FETCH-DEPTH:1 INPUT_FETCH-TAGS:false INPUT_GITHUB-SERVER-URL: INPUT_LFS:false INPUT_PATH: INPUT_PERSIST-CREDENTIALS:true INPUT_REF: INPUT_REPOSITORY:repotest/mono INPUT_SET-SAFE-DIRECTORY:true INPUT_SPARSE-CHECKOUT: INPUT_SPARSE-CHECKOUT-CONE-MODE:true INPUT_SSH-KEY: INPUT_SSH-KNOWN-HOSTS: INPUT_SSH-STRICT:true INPUT_SUBMODULES:false INPUT_TOKEN:*** ImageOS:docker JOB_CONTAINER_NAME:GITEA-ACTIONS-TASK-16_WORKFLOW_JOB-build RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID:]
evaluating expression 'always()'
expression 'always()' evaluated to 'true'
⭐ Run Post Check out repository code
Writing entry to tarball workflow/outputcmd.txt len:0
Writing entry to tarball workflow/statecmd.txt len:0
Writing entry to tarball workflow/pathcmd.txt len:0
Writing entry to tarball workflow/envs.txt len:0
Writing entry to tarball workflow/SUMMARY.md len:0
Extracting content to '/var/run/act'
run post step for 'Check out repository code'
executing remote job container: [node /var/run/act/actions/actions-checkout@v3/dist/index.js]
🐳 docker exec cmd=[node /var/run/act/actions/actions-checkout@v3/dist/index.js] user= workdir=
Exec command '[node /var/run/act/actions/actions-checkout@v3/dist/index.js]'
Working directory '/workspace/repotest/mono'
✅ Success - Post Check out repository code
expression 'echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."' rewritten to 'format('echo "The name of your branch is {0} and your repository is {1}."', gitea.ref, gitea.repository)'
evaluating expression 'format('echo "The name of your branch is {0} and your repository is {1}."', gitea.ref, gitea.repository)'
expression 'format('echo "The name of your branch is {0} and your repository is {1}."', gitea.ref, gitea.repository)' evaluated to '%!t(string=echo "The name of your branch is refs/heads/main and your repository is repotest/mono.")'
expression 'echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!"' rewritten to 'format('echo "This job is now running on a {0} server hosted by Gitea!"', runner.os)'
evaluating expression 'format('echo "This job is now running on a {0} server hosted by Gitea!"', runner.os)'
expression 'format('echo "This job is now running on a {0} server hosted by Gitea!"', runner.os)' evaluated to '%!t(string=echo "This job is now running on a Linux server hosted by Gitea!")'
expression 'echo "The job was automatically triggered by a ${{ gitea.event_name }} event."' rewritten to 'format('echo "The job was automatically triggered by a {0} event."', gitea.event_name)'
evaluating expression 'format('echo "The job was automatically triggered by a {0} event."', gitea.event_name)'
expression 'format('echo "The job was automatically triggered by a {0} event."', gitea.event_name)' evaluated to '%!t(string=echo "The job was automatically triggered by a push event.")'
Cleaning up services for job build
Cleaning up container for job build
Removed container: 460a44a3fa818576f530ee2269a4c75ae5e56d414fd7f530e0460ca9ae349b94
🐳 docker volume rm GITEA-ACTIONS-TASK-16_WORKFLOW_JOB-build
🐳 docker volume rm GITEA-ACTIONS-TASK-16_WORKFLOW_JOB-build-env
🏁 Job failed
Job 'build' failed
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a private repo on a selfhosted forgejo with docker, and I'm having a hard time using "checkout". I cannot seem to find useful info on the net about how to use it properly on a private repo. My understanding is that this will clone the current branch in the working env of the task.
Secrets:
GH_PAT
is registered as a secret inside the repo with full permission.I never used CD/CI or GH actions, so maybe the issue is quite easy to spot – can someone enlighten me ? :)
"Checkout repository code" output:
.forgejo/workflows/test.yaml
:Earlier I tried with v4 and I had another error as the output for that task (truncated):
"Complete job" output:
Beta Was this translation helpful? Give feedback.
All reactions