Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kmelve committed Mar 15, 2019
0 parents commit 072833f
Show file tree
Hide file tree
Showing 7 changed files with 1,451 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
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
44 changes: 44 additions & 0 deletions .github/main.workflow
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"
}
18 changes: 18 additions & 0 deletions Dockerfile
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"]
21 changes: 21 additions & 0 deletions LICENSE
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.
31 changes: 31 additions & 0 deletions README.md
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.
Loading

0 comments on commit 072833f

Please sign in to comment.