-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adapt act_runner exec in action file #25524
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: a1012112796 <1012112796@qq.com>
Wait, is this changing something that works on GH Actions to work on Gitea Actions? Why not fix the root cause? |
not, just want make |
Right, so Maybe it should instead be something like |
I would at minimum make it skip when commit-related environment variables are not set, which I think is the case of Ideally this check would be done in the paths-filter action, e.g. when it is unset, trigger all changes. |
I think |
Hmm I still wonder if there is a cleaner solution and whether |
Would |
Co-authored-by: a1012112796 <1012112796@qq.com>
Let's try with
|
Actually it did not work, with
Without HEAD:
Maybe we actually need to detect |
@a1012112796 can you try latest change with |
@silverwind test result, looks 'base' is required. How about someting like this? @@ -36,7 +36,7 @@ jobs:
id: changes
with:
# needed for `act_runner exec`
- ref: ${{ env.ACT_EXEC == 'true' && 'HEAD' || env.GITHUB_REF }}
+ base: ${{ env.ACT_EXEC == 'true' && 'HEAD' || '' }}
filters: |
backend:
- "**/*.go"
|
Signed-off-by: a1012112796 <1012112796@qq.com>
Hmm I think we lack |
@a1012112796 please try this one, I set |
@silverwind looks no changed files was found ... full logs:
time="2023-08-22T01:04:24Z" level=info msg="Using chosed event for filtering: pull_request"
time="2023-08-22T01:04:24Z" level=info msg="Planning job: test-unit"
time="2023-08-22T01:04:24Z" level=info msg="cache handler listens on: http://192.168.170.128:43319"
time="2023-08-22T01:04:24Z" level=info msg="Start server on http://192.168.170.128:34567"
[files-changed/files-changed/detect] 🚀 Start image=catthehacker/ubuntu:runner-latest
time="2023-08-22T01:04:24Z" level=info msg="Parallel tasks (0) below minimum, setting to 1"
[files-changed/files-changed/detect] 🐳 docker pull image=catthehacker/ubuntu:runner-latest platform= username= forcePull=false
time="2023-08-22T01:04:24Z" level=info msg="Parallel tasks (0) below minimum, setting to 1"
[files-changed/files-changed/detect] 🐳 docker create image=catthehacker/ubuntu:runner-latest platform= entrypoint=["/bin/sleep" "10800"] cmd=[]
[files-changed/files-changed/detect] 🐳 docker run image=catthehacker/ubuntu:runner-latest platform= entrypoint=["/bin/sleep" "10800"] cmd=[]
[files-changed/files-changed/detect] 🐳 docker exec cmd=[chown -R 1001:1001 /home/zzc/gitea_ws/gitea] user=0 workdir=
[files-changed/files-changed/detect] ☁ git clone 'https://github.com/dorny/paths-filter' # ref=v2
[files-changed/files-changed/detect] ⭐ Run Main actions/checkout@v3
[files-changed/files-changed/detect] 🐳 docker cp src=/home/zzc/gitea_ws/gitea/. dst=/home/zzc/gitea_ws/gitea
[files-changed/files-changed/detect] 🐳 docker exec cmd=[chown -R 1001:1001 /home/zzc/gitea_ws/gitea] user=0 workdir=
[files-changed/files-changed/detect] ✅ Success - Main actions/checkout@v3
[files-changed/files-changed/detect] ⭐ Run Main dorny/paths-filter@v2
[files-changed/files-changed/detect] 🐳 docker cp src=/home/zzc/.cache/act/dorny-paths-filter@v2/ dst=/var/run/act/actions/dorny-paths-filter@v2/
[files-changed/files-changed/detect] 🐳 docker exec cmd=[chown -R 1001:1001 /var/run/act/actions/dorny-paths-filter@v2/] user=0 workdir=
[files-changed/files-changed/detect] 🐳 docker exec cmd=[node /var/run/act/actions/dorny-paths-filter@v2/dist/index.js] user= workdir=
[files-changed/files-changed/detect] ❓ ::group::Get current git ref
[files-changed/files-changed/detect] | ::group::Get current git ref
[files-changed/files-changed/detect] | [command]/usr/bin/git branch --show-current
[files-changed/files-changed/detect] | zzc/dev/act_runner_exec
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] | Changes will be detected between main and HEAD
[files-changed/files-changed/detect] ❓ ::group::Searching for merge-base main...HEAD
[files-changed/files-changed/detect] | ::group::Searching for merge-base main...HEAD
[files-changed/files-changed/detect] | [command]/usr/bin/git show-ref main
[files-changed/files-changed/detect] | b3f713717407fcb66515a7a702e81b2028800f76 refs/heads/main
[files-changed/files-changed/detect] | 3db3f5daaeea38a9a8d8ec1a05d864e288338f82 refs/remotes/or_p/main
[files-changed/files-changed/detect] | da6df0d0636c9e7bb5481e41dcd7d8f9b46deed5 refs/remotes/or_zzc/main
[files-changed/files-changed/detect] | b3f713717407fcb66515a7a702e81b2028800f76 refs/remotes/origin/main
[files-changed/files-changed/detect] | 1e76a824bcd71acd59cdfb2c4547806bc34b3d86 refs/remotes/yp05327/main
[files-changed/files-changed/detect] | [command]/usr/bin/git show-ref HEAD
[files-changed/files-changed/detect] | b3f713717407fcb66515a7a702e81b2028800f76 refs/remotes/origin/HEAD
[files-changed/files-changed/detect] | [command]/usr/bin/git merge-base refs/remotes/origin/main refs/remotes/origin/HEAD
[files-changed/files-changed/detect] | b3f713717407fcb66515a7a702e81b2028800f76
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Change detection refs/remotes/origin/main...refs/remotes/origin/HEAD
[files-changed/files-changed/detect] | ::group::Change detection refs/remotes/origin/main...refs/remotes/origin/HEAD
[files-changed/files-changed/detect] | [command]/usr/bin/git diff --no-renames --name-status -z refs/remotes/origin/main...refs/remotes/origin/HEAD
[files-changed/files-changed/detect] |
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] | Detected 0 changed files
[files-changed/files-changed/detect] | Results:
[files-changed/files-changed/detect] ❓ ::group::Filter backend = false
[files-changed/files-changed/detect] | ::group::Filter backend = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Filter frontend = false
[files-changed/files-changed/detect] | ::group::Filter frontend = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Filter docs = false
[files-changed/files-changed/detect] | ::group::Filter docs = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Filter actions = false
[files-changed/files-changed/detect] | ::group::Filter actions = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Filter templates = false
[files-changed/files-changed/detect] | ::group::Filter templates = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Filter docker = false
[files-changed/files-changed/detect] | ::group::Filter docker = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] ❓ ::group::Filter swagger = false
[files-changed/files-changed/detect] | ::group::Filter swagger = false
[files-changed/files-changed/detect] | Matching files: none
[files-changed/files-changed/detect] ❓ ::endgroup::
[files-changed/files-changed/detect] | ::endgroup::
[files-changed/files-changed/detect] | Changes output set to []
[files-changed/files-changed/detect] ✅ Success - Main dorny/paths-filter@v2
[files-changed/files-changed/detect] ⚙ ::set-output:: backend_count=0
[files-changed/files-changed/detect] ⚙ ::set-output:: frontend=false
[files-changed/files-changed/detect] ⚙ ::set-output:: actions_count=0
[files-changed/files-changed/detect] ⚙ ::set-output:: swagger=false
[files-changed/files-changed/detect] ⚙ ::set-output:: swagger_count=0
[files-changed/files-changed/detect] ⚙ ::set-output:: changes=[]
[files-changed/files-changed/detect] ⚙ ::set-output:: docs_count=0
[files-changed/files-changed/detect] ⚙ ::set-output:: actions=false
[files-changed/files-changed/detect] ⚙ ::set-output:: docs=false
[files-changed/files-changed/detect] ⚙ ::set-output:: templates=false
[files-changed/files-changed/detect] ⚙ ::set-output:: templates_count=0
[files-changed/files-changed/detect] ⚙ ::set-output:: docker=false
[files-changed/files-changed/detect] ⚙ ::set-output:: backend=false
[files-changed/files-changed/detect] ⚙ ::set-output:: frontend_count=0
[files-changed/files-changed/detect] ⚙ ::set-output:: docker_count=0
[files-changed/files-changed/detect] Cleaning up services for job detect
time="2023-08-22T01:04:32Z" level=info msg="Parallel tasks (0) below minimum, setting to 1"
[files-changed/files-changed/detect] Cleaning up container for job detect
[files-changed/files-changed/detect] Cleaning up network for job detect, and network name is: GITEA-ACTIONS-TASK-pull-request_WORKFLOW-files-changed_JOB-detect-network
[files-changed/files-changed/detect] 🏁 Job succeeded
looks only when the |
Hmm, the problem with What we want is a diff between PR target branch and current working tree including any potential uncomitted changes, e.g. the output of |
make
act_runner exec
useable again.follow: