我正在使用 GitHub 操作“构建”Python 应用程序(运行 linting、代码覆盖率和测试)。在操作结束时,我收到以下警告:
1 warning
build
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
but my python-app.yml不使用设置输出:
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with pylint
run: |
pylint src
continue-on-error: false
- name: Test with pytest
run: |
pytest
- name: pytest coverage
run:
pytest --cov=./ --cov-report=xml:tests/coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
所以我不知道如何修改我的.yml以便使其符合未来的要求。
在您的工作流程中,可能存在对尚未更新的操作的间接依赖关系GITHUB_输出反对这set-output弃用.
您需要通过以下命令一一检查工作流程中的所有操作是否有版本更新set-output
fix.
就您而言,访问https://github.com/actions/setup-python显示有新版本可用。并且,寻找set-output
存储库中的字符串会产生相关引用,例如问题、提交等。例如,这个问题(https://github.com/actions/setup-python/issues/578)验证它已被修复@v4
.
所以,到目前为止,使用@v4
应该修复它,即:
- uses: actions/setup-python@v4
动作正在逐步更新。希望所有这些都将很快更新,我们不会再看到该警告。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)