Skip to content

Commit 072833f

Browse files
committed
inital commit
0 parents  commit 072833f

File tree

7 files changed

+1451
-0
lines changed

7 files changed

+1451
-0
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ignore all files by default
2+
*
3+
# include required files with an exception
4+
!entrypoint.sh
5+
!LICENSE
6+
!README.md
7+
!THIRD_PARTY_NOTICE.md

.github/main.workflow

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
workflow "Build and Publish" {
2+
on = "push"
3+
resolves = "Docker Publish"
4+
}
5+
6+
action "Shell Lint" {
7+
uses = "actions/bin/shellcheck@master"
8+
args = "entrypoint.sh"
9+
}
10+
11+
action "Docker Lint" {
12+
uses = "docker://replicated/dockerfilelint"
13+
args = ["Dockerfile"]
14+
}
15+
16+
action "Build" {
17+
needs = ["Shell Lint", "Docker Lint"]
18+
uses = "actions/docker/cli@master"
19+
args = "build -t sanity ."
20+
}
21+
22+
action "Docker Tag" {
23+
needs = ["Build"]
24+
uses = "actions/docker/tag@master"
25+
args = "sanity kmelve/github-actions-sanity-io --no-latest"
26+
}
27+
28+
action "Publish Filter" {
29+
needs = ["Build"]
30+
uses = "actions/bin/filter@master"
31+
args = "branch master"
32+
}
33+
34+
action "Docker Login" {
35+
needs = ["Publish Filter"]
36+
uses = "actions/docker/login@master"
37+
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"]
38+
}
39+
40+
action "Docker Publish" {
41+
needs = ["Docker Tag", "Docker Login"]
42+
uses = "actions/docker/cli@master"
43+
args = "push kmelve/github-actions-sanity-io"
44+
}

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:10-slim
2+
3+
LABEL version="1.0.0"
4+
LABEL repository="http://github.com/kmelve/actions-sanity-io"
5+
LABEL homepage="http://github.com/actions/actions-sanity-io"
6+
LABEL maintainer="Sanity.io <[email protected]>"
7+
8+
LABEL "com.github.actions.name"="GitHub Action for Sanity.io"
9+
LABEL "com.github.actions.description"="Wraps the Sanity.io to enable common commands."
10+
LABEL "com.github.actions.icon"="upload-cloud"
11+
LABEL "com.github.actions.color"="red"
12+
COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
13+
14+
RUN yarn global add @sanity/cli
15+
16+
COPY entrypoint.sh /entrypoint.sh
17+
18+
ENTRYPOINT ["/entrypoint.sh"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 GitHub, Inc. and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# GitHub Action for Sanity.io
2+
3+
This Action wraps the [Sanity CLI](https://github.com/sanity-io/sanity) to enable common Now commands.
4+
5+
## Usage
6+
7+
```workflow
8+
workflow "Deploy on sanity.studio" {
9+
on = "push"
10+
resolves = ["deploy"]
11+
}
12+
13+
action "deploy" {
14+
needs = ["deploy"]
15+
uses = "docker://kmelve/github-actions-sanity-io"
16+
args = "deploy"
17+
secrets = [
18+
"SANITY_AUTH_TOKEN",
19+
]
20+
}
21+
```
22+
23+
### Secrets
24+
25+
- `SANTY_AUTH_TOKEN` - **Required**. The token to use for authentication with the Sanity.io API ([more info](https://www.sanity.io/docs))
26+
27+
## License
28+
29+
The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE).
30+
31+
Container images built with this project include third party materials. See [THIRD_PARTY_NOTICE.md](THIRD_PARTY_NOTICE.md) for details.

0 commit comments

Comments
 (0)