mirror of
https://github.com/Estom/notes.git
synced 2026-02-02 18:20:20 +08:00
Create call_remote_api.yml
This commit is contained in:
22
.github/workflows/call_remote_api.yml
vendored
Normal file
22
.github/workflows/call_remote_api.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# .github/workflows/call_remote_api.yml
|
||||
|
||||
name: Call Remote API on Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # 可以指定分支名称,这里以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信息
|
||||
Reference in New Issue
Block a user