-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 072833f
Showing
7 changed files
with
1,451 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ignore all files by default | ||
* | ||
# include required files with an exception | ||
!entrypoint.sh | ||
!LICENSE | ||
!README.md | ||
!THIRD_PARTY_NOTICE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
workflow "Build and Publish" { | ||
on = "push" | ||
resolves = "Docker Publish" | ||
} | ||
|
||
action "Shell Lint" { | ||
uses = "actions/bin/shellcheck@master" | ||
args = "entrypoint.sh" | ||
} | ||
|
||
action "Docker Lint" { | ||
uses = "docker://replicated/dockerfilelint" | ||
args = ["Dockerfile"] | ||
} | ||
|
||
action "Build" { | ||
needs = ["Shell Lint", "Docker Lint"] | ||
uses = "actions/docker/cli@master" | ||
args = "build -t sanity ." | ||
} | ||
|
||
action "Docker Tag" { | ||
needs = ["Build"] | ||
uses = "actions/docker/tag@master" | ||
args = "sanity kmelve/github-actions-sanity-io --no-latest" | ||
} | ||
|
||
action "Publish Filter" { | ||
needs = ["Build"] | ||
uses = "actions/bin/filter@master" | ||
args = "branch master" | ||
} | ||
|
||
action "Docker Login" { | ||
needs = ["Publish Filter"] | ||
uses = "actions/docker/login@master" | ||
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"] | ||
} | ||
|
||
action "Docker Publish" { | ||
needs = ["Docker Tag", "Docker Login"] | ||
uses = "actions/docker/cli@master" | ||
args = "push kmelve/github-actions-sanity-io" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM node:10-slim | ||
|
||
LABEL version="1.0.0" | ||
LABEL repository="http://github.com/kmelve/actions-sanity-io" | ||
LABEL homepage="http://github.com/actions/actions-sanity-io" | ||
LABEL maintainer="Sanity.io <[email protected]>" | ||
|
||
LABEL "com.github.actions.name"="GitHub Action for Sanity.io" | ||
LABEL "com.github.actions.description"="Wraps the Sanity.io to enable common commands." | ||
LABEL "com.github.actions.icon"="upload-cloud" | ||
LABEL "com.github.actions.color"="red" | ||
COPY LICENSE README.md THIRD_PARTY_NOTICE.md / | ||
|
||
RUN yarn global add @sanity/cli | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 GitHub, Inc. and contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# GitHub Action for Sanity.io | ||
|
||
This Action wraps the [Sanity CLI](https://github.com/sanity-io/sanity) to enable common Now commands. | ||
|
||
## Usage | ||
|
||
```workflow | ||
workflow "Deploy on sanity.studio" { | ||
on = "push" | ||
resolves = ["deploy"] | ||
} | ||
action "deploy" { | ||
needs = ["deploy"] | ||
uses = "docker://kmelve/github-actions-sanity-io" | ||
args = "deploy" | ||
secrets = [ | ||
"SANITY_AUTH_TOKEN", | ||
] | ||
} | ||
``` | ||
|
||
### Secrets | ||
|
||
- `SANTY_AUTH_TOKEN` - **Required**. The token to use for authentication with the Sanity.io API ([more info](https://www.sanity.io/docs)) | ||
|
||
## License | ||
|
||
The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE). | ||
|
||
Container images built with this project include third party materials. See [THIRD_PARTY_NOTICE.md](THIRD_PARTY_NOTICE.md) for details. |
Oops, something went wrong.