├── Dockerfile ├── README.md └── entrypoint.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | LABEL "com.github.actions.name"="Github Action for wget" 4 | LABEL "com.github.actions.description"="Wraps the wget CLI to be used in Github Actions" 5 | LABEL "com.github.actions.icon"="download" 6 | LABEL "com.github.actions.color"="gray-dark" 7 | 8 | LABEL "repository"="http://github.com/wei/wget" 9 | LABEL "homepage"="http://github.com/wei/wget" 10 | LABEL "maintainer"="Wei He " 11 | 12 | RUN apk add --no-cache ca-certificates 13 | 14 | ADD *.sh / 15 | 16 | ENTRYPOINT ["/entrypoint.sh"] 17 | CMD ["--help"] 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Action for wget 2 | 3 | Wraps the wget CLI to be used in GitHub Actions. See also [GitHub Action for curl](https://github.com/marketplace/actions/github-action-for-curl). 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 | on: push 16 | jobs: 17 | wget: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: wget 21 | uses: wei/wget@v1 22 | with: 23 | args: -O sample.html https://httpbin.org/html 24 | ``` 25 | 26 | ``` 27 | on: push 28 | jobs: 29 | wget: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: wget 33 | uses: wei/wget@v1 34 | with: 35 | args: -qO- https://httpbin.org/get 36 | ``` 37 | 38 | ### Docker 39 | ``` 40 | docker run --rm $(docker build -q .) \ 41 | -qO- https://httpbin.org/get 42 | ``` 43 | 44 | 45 | ## Author 46 | [Wei He](https://github.com/wei) _github@weispot.com_ 47 | 48 | 49 | ## License 50 | [MIT](https://wei.mit-license.org) 51 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | sh -c "wget -nv $*" 6 | --------------------------------------------------------------------------------