File tree Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM alpine
2
+
3
+ LABEL "com.github.actions.name" ="Github Action for curl"
4
+ LABEL "com.github.actions.description" ="Wraps the curl CLI to be used in Github Actions"
5
+ LABEL "com.github.actions.icon" ="download-cloud"
6
+ LABEL "com.github.actions.color" ="gray-dark"
7
+
8
+ LABEL "repository" ="http://github.com/wei/curl"
9
+ LABEL "homepage" ="http://github.com/wei/curl"
10
+ LABEL "maintainer" =
"Wei He <[email protected] >"
11
+
12
+ RUN apk add --no-cache curl ca-certificates
13
+
14
+ ADD *.sh /
15
+
16
+ ENTRYPOINT ["/entrypoint.sh" ]
17
+ CMD ["--help" ]
Original file line number Diff line number Diff line change
1
+ # Github Action for curl
2
+
3
+ Wraps the curl CLI to be used in Github Actions. See also [ Github Action for wget] ( https://github.com/marketplace/actions/github-action-for-wget ) .
4
+
5
+
6
+ ## Features
7
+ * make http requests
8
+ * http errors are treated as errors
9
+
10
+
11
+ ## Usage
12
+
13
+ ### Github Actions
14
+ ```
15
+ action "curl" {
16
+ uses = "wei/curl@master"
17
+ args = "https://httpbin.org/get"
18
+ }
19
+ ```
20
+
21
+ ```
22
+ action "curl" {
23
+ uses = "wei/curl@master"
24
+ args = "-X POST https://httpbin.org/post"
25
+ }
26
+ ```
27
+
28
+ ```
29
+ action "curl" {
30
+ uses = "wei/curl@master"
31
+ args = "--upload-file .github/main.workflow https://transfer.sh/main.workflow"
32
+ }
33
+ ```
34
+
35
+ ### Docker
36
+ ```
37
+ docker run --rm $(docker build -q .) \
38
+ https://httpbin.org/get
39
+ ```
40
+
41
+
42
+ ## Author
43
+ [ Wei He
] ( https://github.com/wei ) _ [email protected] _
44
+
45
+
46
+ ## License
47
+ [ MIT] ( https://wei.mit-license.org )
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ sh -c " curl --silent --show-error --fail $* "
You can’t perform that action at this time.
0 commit comments