英文:
GitHub Actions workflow cancelling a step on itself
问题
以下是步骤:
- name: run
if: endsWith(github.ref, '/feature')
run: |
echo "installing dependencies"
pip3 install --upgrade pip
pip3 install poetry
cd job-extract/trans/project-v2
poetry install
echo "executing dbt"
make source_dbt
make run_catalog_server
make run_scheduled_refresh
我正在提供 GitHub Actions 工作流程取消步骤的日志, 请告诉我如何解决这个问题。
此外,请告诉我如何使用通知操作来捕获并通知这样的运行?
日志链接:logslink
英文:
Below is the step:
- name: run
if: endsWith(github.ref, '/feature')
run: |
echo "installing dependencies"
pip3 install --upgrade pip
pip3 install poetry
cd job-extract/trans/project-v2
poetry install
echo "executing dbt"
make source_dbt
make run_catalog_server
make run_scheduled_refresh
I am putting the logs which indicate that GitHub Actions workflow is cancelling the step itself. Please let me know how this can be resolved.
Also please let me know how can I use a notify action to catch and notify such runs?
Logs: logslink
答案1
得分: 1
你的工作流程中是否使用了'concurrency'?
我可以使用通知操作来捕获并通知这种运行吗?
是的,你可以尝试类似这样的方式(并将'echo'替换为一些Slack操作):
notification-job:
needs: build-job
runs-on: ubuntu-latest
if: cancelled()
steps:
- name: Notification
run: echo "我被取消了"
英文:
Do you use 'concurrency' in your workflow?
> can i use a notify action to catch and notify such runs?
Yes, you can try something like this (and replace 'echo' with some Slack action):
notification-job:
needs: build-job
runs-on: ubuntu-latest
if: cancelled()
steps:
- name: Notification
run: echo "i was canceled "
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论