Files
notes_estom/.github/workflows/call_remote_api.yml
2024-01-21 19:44:34 +08:00

23 lines
642 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# .github/workflows/call_remote_api.yml
name: Call Remote API on Push
on:
push:
branches:
- '*' # 可以指定分支名称这里以main分支为例也可以使用'*'匹配所有分支
jobs:
call-api:
runs-on: ubuntu-latest # 指定运行环境这里是最新Ubuntu
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Call Remote API
run: |
curl -X GET http://8.141.4.34/#/
# curl -X POST -H "Content-Type: application/json" -d '{"key": "value"}' https://your-api-url.com/endpoint
# 替换上述命令中的URL和数据为你的实际API信息