首页 > 解决方案 > Github 工作流程:在操作/结帐部分找不到存储库

问题描述

我正在尝试通过 github 工作流程让我的 python 项目在 Pypi 上自动更新。我从未做过 github 工作流程(或任何工作流程)。它似乎不起作用。

就是这条线:uses: action/checkout@mainbuild-n-publish零件下面。

它总是失败,我得到: Unable to resolve action action/checkout@main,repository not found。
无论我用什么代替 main,无论是 v1、v2、master 等,都会发生这种情况......

我在网上找不到任何解释它的东西。我应该用什么代替主要?

对于上下文.yml文件:

name: CI
on: 
  push:
    branches: 
      - main

jobs:
  build-n-publish:
    name: build and publish pee to pypi
    runs-on: macOS-latest
    steps:
      - uses: action/checkout@pee
        with: 
          repository: ''
      - name: Set up Python 3.6
        uses: actions/setup-python@v1
        with:
          python-version: 3.6
      - name: Install pypa/build
        run: >-
          python -m
          pip install
          build
          --user
      - name: Build a binary wheel and a source tarball
        run: >-
          python -m
          build
          --sdist
          --wheel
          --outdir dist/
      - name: Publish distribution  to Test PyPI
        uses: pypa/gh-action-pypi-publish@master
        with:
          password: ${{ secrets.pypi_password }}
          repository_url: https://pypi.org/legacy/
      - name: Publish distribution  to PyPI
        if: startsWith(github.ref, 'refs/tags')
        uses: pypa/gh-action-pypi-publish@master
        with:
          password: ${{ secrets.pypi_password }}.

标签: github-actionspypi

解决方案


推荐阅读