我在同一个 GitHub Actions 工作流程中有两项工作。第一个文件创建一个文件,第二个文件期望在第一个文件创建的同一目录中找到该文件。
我想我可以actions/cache@v3像这样使用它:
jobs:
job1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: some_dir/my_file
key: my_file
... (create the file)
job2:
needs: job1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: some_dir/my_file
key: my_file
... (use the file)
Run Code Online (Sandbox Code Playgroud)
GitHub Action 表示缓存已在 中成功恢复job2,但是,在job2我无法my_file在我期望的目录中找到它。问题是什么?
在 Android Compose 中,我想创建一个Row占据所有可用宽度并包含两个文本的文本:

我尽力做到这一点,但我只能实现以下目标之一:
A。使第二个文本紧接在第一个文本之后,但首先溢出(只需将它们一个接一个地放在代码中)。
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
Text(text = title)
Text(
text = "Fixed text",
maxLines = 1
)
}
Run Code Online (Sandbox Code Playgroud)

b. 让第一个文本首先溢出,但在它不溢出时占据整个可用空间(通过添加Modifier.weight(1f)到第一个文本)。
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = title,
modifier = Modifier.weight(1f)
)
Text(
text = "Fixed text",
maxLines = 1
)
}
Run Code Online (Sandbox Code Playgroud)

我怎样才能实现所描述的行为?我知道我可能可以使用ConstraintLayout,但如果可能的话我想避免它。