Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
v1
  • Loading branch information
Greg Brimble committed Apr 25, 2020
1 parent 6897db7 commit 0bb5a21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -9,14 +9,14 @@
As a part of your [GitHub Actions](https://github.com/features/actions) workflow, add a new step as follows:

```yml
name: Deploy
name: Update
on:
push:
schedule:
- cron: "0 0 * * *" # Every day at midnight
jobs:
deploy:
name: Deploy
name: Update
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -50,10 +50,10 @@ The following input options are available:
| `actor` | The GitHub user to commit changes with <br />e.g. `gregbrimble` | No | Defaults to the current user (`{{ github.actor }}`) |
| `repository` | The workspace repository <br />e.g. `gregbrimble/tailwindui` | No | Defaults to the current repository (`{{ github.repository }}`). Should contain a `.env` file in the root. |
| `crawler` | The repository of the crawler to use | No | Defaults to `kiliman/tailwindui-crawler` |
| `crawlerref` | The ref (branch, tag or SHA) to checkout of the crawler repository | No | Defaults to `master` |

Note: If using a separate private repository for the output, you must include a Personal Access Token in the `token` input, as the `{{ github.token }}` tokens are scoped to only the current repository.

## Roadmap

- [] Specify crawler version
- [] Create a PR against the output repository
- [ ] Create a PR against the output repository
4 changes: 4 additions & 0 deletions action.yml
Expand Up @@ -40,6 +40,10 @@ inputs:
description: "The repository of the crawler (defaults to 'kiliman/tailwindui-crawler')"
required: false
default: "kiliman/tailwindui-crawler"
crawlerref:
description: "The ref (branch, tag or SHA) to checkout of the crawler"
required: false
default: "master"
runs:
using: "docker"
image: "Dockerfile"
Expand Down
3 changes: 2 additions & 1 deletion entrypoint.sh
Expand Up @@ -3,13 +3,13 @@
export WORKSPACE_REPOSITORY="$INPUT_REPOSITORY"
export CRAWLER_REPOSITORY="$INPUT_CRAWLER"
export OUTPUT_REPOSITORY="$INPUT_OUTPUT"
export INPUT_REF="master"
unset INPUT_REPOSITORY

# Clone crawler
echo "Cloning crawler..."
mkdir /crawler

export INPUT_REF="$INPUT_CRAWLERREF"
export GITHUB_WORKSPACE="/crawler"
export GITHUB_REPOSITORY="$CRAWLER_REPOSITORY"

Expand All @@ -24,6 +24,7 @@ npm install
echo "Cloning workspace..."
mkdir /workspace

export INPUT_REF="master"
export GITHUB_WORKSPACE="/workspace"
export GITHUB_REPOSITORY="$WORKSPACE_REPOSITORY"

Expand Down
2 changes: 1 addition & 1 deletion lib/actions/checkout/README.md
@@ -1,3 +1,3 @@
# Checkout Action

Taken from [dist/](https://github.com/actions/checkout/blob/01aecccf739ca6ff86c0539fbc67a7a5007bbc81/dist).
Taken from [dist/](https://github.com/actions/checkout/blob/01aecccf739ca6ff86c0539fbc67a7a5007bbc81/dist) and removed the `problem-matcher.json` matcher.

0 comments on commit 0bb5a21

Please sign in to comment.