英文:
Why github action workflow run twice on first push to my repository?
问题
GitHub操作工作流在第一次推送到我的存储库时运行两次。
我将此工作流添加到我的Laravel项目中,以下是我的工作流程:
name: 部署工作流程
on:
push:
branches:
- main
jobs:
部署:
runs-on: ubuntu-latest
steps:
- name: 获取代码
uses: actions/checkout@v3
- name: 列出所有文件
run: ls -la
我创建了GitHub存储库,然后首次将项目推送到主分支,这个工作流程触发了两次。
但在后续的推送中,工作流程只触发一次。可以有人解释为什么在第一次提交(第一次推送)时工作流程会运行两次吗?
英文:
Github action workflow run twice on first push to my repository.
I added this workflow to my laravel project,here is my workflow
name: Deployment Workflow
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: List all files
run: ls -la
I create github repository and then push the project to main branch for the first time,the workflow triggers twice.
But in the next pushes,the workflow trigger just once
Can someone explain why the workflow runs twice on first commit(first push)?
答案1
得分: 1
Potentially a bug with GitHub actions, see:
https://github.com/orgs/community/discussions/50356
英文:
Potentially a bug with GitHub actions, see:
https://github.com/orgs/community/discussions/50356
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论