It seems that issue mentioned in https://gitea.com/gitea/act_runner/pulls/396 is still not resolved:
```
- name: Push local image
uses: docker/build-push-action@v5
with:
context: .
tags: |
<some tag>
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
```
It fails with:
```
::group::GitHub Actions runtime token ACs
::warning::Cannot parse GitHub Actions Runtime Token: Invalid token specified: missing part #2
::endgroup::
...
[command]/usr/bin/docker buildx build --cache-from type=gha --cache-to type=gha,mode=max --iidfile /tmp/docker-actions-toolkit-LOwump/iidfile --tag <some tag> --load --metadata-file /tmp/docker-actions-toolkit-LOwump/metadata-file .
ERROR: failed to solve: failed to configure gha cache exporter: token contains an invalid number of segments
::error::buildx failed with: ERROR: failed to solve: failed to configure gha cache exporter: token contains an invalid number of segments
```
When using empty ACTION_RUNTIME_TOKEN in environment vars - cache is not used:
```
::group::GitHub Actions runtime token ACs
::warning::ACTIONS_RUNTIME_TOKEN not set
::endgroup::
...
[command]/usr/bin/docker buildx build --cache-from type=gha --cache-to type=gha,mode=max --iidfile /tmp/docker-actions-toolkit-2BEOrN/iidfile --tag <some tag> --load --metadata-file /tmp/docker-actions-toolkit-2BEOrN/metadata-file .
```
As stated here: https://gitea.com/gitea/act_runner/issues/119#issuecomment-738294 - this token is not a JWT, but a simple string.
Is it possible to convert it to JWT?
I also hope Gitea migrates to use JWT tokens here, because actions/upload-artifact@v4 and actions/download-artifact@v4 will require them once the GHES / Gitea is no longer blocked behind a github.com flag.
I believe this would require changes to the artifacts backend on the Gitea Server side
this token is not a JWT, but a simple string.
I think it currently has the same format as a PAT token, with a restricted livetime.
I also hope Gitea migrates to use JWT tokens here, because `actions/upload-artifact@v4` and `actions/download-artifact@v4` will require them once the GHES / Gitea is no longer blocked behind a github.com flag.
See here: <https://github.com/nektos/act/issues/2135>
_I believe this would require changes to the artifacts backend on the Gitea Server side_
> this token is not a JWT, but a simple string.
I think it currently has the same format as a PAT token, with a restricted livetime.
It's not resolved completely. But the PR you referenced is doing right.
Before that fix, the build-push-action will exit as an error, thus the action will exit incompletely. After that, it will show a warning and continue to work. It will lose some functionality(like the cache you mentioned). However the workflow file of this repo only needs to upload the image to the docker hub, so the workaround can be removed. That fix is about turning an error into a warning and your issue is about a warning affecting some functionality.
I also hope Gitea migrates to use JWT tokens here
Agreed. Otherwise, some of the actions cannot be reused in Gitea Actions.
It's not resolved completely. But the PR you referenced is doing right.
Before that fix, the `build-push-action` will exit as an error, thus the action will exit incompletely. After that, it will show a warning and continue to work. It will lose some functionality(like the `cache` you mentioned). However the workflow file of this repo only needs to upload the image to the docker hub, so the workaround can be removed. That fix is about turning an error into a warning and your issue is about a warning affecting some functionality.
> I also hope Gitea migrates to use JWT tokens here
Agreed. Otherwise, some of the actions cannot be reused in Gitea Actions.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
It seems that issue mentioned in https://gitea.com/gitea/act_runner/pulls/396 is still not resolved:
It fails with:
When using empty ACTION_RUNTIME_TOKEN in environment vars - cache is not used:
As stated here: https://gitea.com/gitea/act_runner/issues/119#issuecomment-738294 - this token is not a JWT, but a simple string.
Is it possible to convert it to JWT?
I also hope Gitea migrates to use JWT tokens here, because
actions/upload-artifact@v4andactions/download-artifact@v4will require them once the GHES / Gitea is no longer blocked behind a github.com flag.See here: https://github.com/nektos/act/issues/2135
I believe this would require changes to the artifacts backend on the Gitea Server side
I think it currently has the same format as a PAT token, with a restricted livetime.
It's not resolved completely. But the PR you referenced is doing right.
Before that fix, the
build-push-actionwill exit as an error, thus the action will exit incompletely. After that, it will show a warning and continue to work. It will lose some functionality(like thecacheyou mentioned). However the workflow file of this repo only needs to upload the image to the docker hub, so the workaround can be removed. That fix is about turning an error into a warning and your issue is about a warning affecting some functionality.Agreed. Otherwise, some of the actions cannot be reused in Gitea Actions.
I'm still working on this issue...
Current work is done here https://github.com/go-gitea/gitea/pull/29584