Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unset repository env
  • Loading branch information
Greg Brimble committed Apr 25, 2020
1 parent 9988d88 commit 4530ef7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions entrypoint.sh
Expand Up @@ -3,16 +3,24 @@
export WORKSPACE_REPOSITORY="$INPUT_REPOSITORY"
export CRAWLER_REPOSITORY="$INPUT_CRAWLER"
export OUTPUT_REPOSITORY="$INPUT_OUTPUT"
unset INPUT_REPOSITORY

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

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

node /checkout.js

# Install crawler dependencies
echo "Installing crawler dependencies..."
cd /crawler
npm install

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

export GITHUB_WORKSPACE="/workspace"
Expand All @@ -21,14 +29,12 @@ export GITHUB_REPOSITORY="$WORKSPACE_REPOSITORY"
node /checkout.js

# Inject .env from workspace
echo "Injecting .env from workspace..."
touch /workspace/.env
cp /workspace/.env /crawler/.env

# Install crawler dependencies
cd /crawler
npm install

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

export GITHUB_WORKSPACE="/output"
Expand All @@ -37,20 +43,24 @@ export GITHUB_REPOSITORY="$OUTPUT_REPOSITORY"
node /checkout.js

# Run crawler
echo "Running crawler..."

export OUTPUT="/output"
export EMAIL="$INPUT_EMAIL"
export PASSWORD="$INPUT_PASSWORD"

ls /crawler
node /crawler/index.js

# Commit the changes
# Commit changes
echo "Commiting changes..."
cd /output

git add .
git commit -m "$INPUT_COMMITMESSAGE"

# Push changes
echo "Pushing changes..."
force_option=""

if $INPUT_FORCE; then
Expand Down

0 comments on commit 4530ef7

Please sign in to comment.