为什么 GitHub Action 工作流在首次推送到我的存储库时运行两次?

huangapple go评论49阅读模式
英文:

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.

为什么 GitHub Action 工作流在首次推送到我的存储库时运行两次?

But in the next pushes,the workflow trigger just once

为什么 GitHub Action 工作流在首次推送到我的存储库时运行两次?

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

huangapple
  • 本文由 发表于 2023年5月11日 16:16:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76225479.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定