Skip to content

Commit

Permalink
cicd: revert checking out staging/add commit and push
Browse files Browse the repository at this point in the history
  • Loading branch information
Naramsim committed Dec 13, 2023
1 parent 912f135 commit bd6b4c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Resources/scripts/updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ get_invokator_pr_number() {
# Clone the repository containing the static JSON files
clone() {
git clone "https://github.com/${org}/${data_repo}.git" "$data_repo"
(cd "$data_repo" && git checkout staging)
}

# Configure git to use the supplied user when committing
Expand Down Expand Up @@ -178,7 +177,7 @@ run_updater() {

# Run the updater
docker network create pokeapi
docker run --privileged --network pokeapi --network-alias docker -e REPO_POKEAPI_CHECKOUT_OBJECT="$CIRCLE_SHA1" -e COMMIT_EMAIL="$email" -e COMMIT_NAME="$username" -e BRANCH_NAME="$branch_name" -e REPO_POKEAPI="https://github.com/$org/$engine_repo.git" -e REPO_DATA="https://$MACHINE_USER_GITHUB_API_TOKEN@github.com/$org/$data_repo.git" -e COMMIT_MESSAGE="[Updater Bot] Regenerate data from https://github.com/$org/$engine_repo/pull/$(get_invokator_pr_number)" -e RUN_AS='root' pokeapi-updater
docker run --privileged --network pokeapi --network-alias docker -e REPO_POKEAPI_CHECKOUT_OBJECT="$CIRCLE_SHA1" -e COMMIT_EMAIL="$email" -e COMMIT_NAME="$username" -e BRANCH_NAME="$branch_name" -e REPO_POKEAPI="https://github.com/$org/$engine_repo.git" -e REPO_DATA="https://$MACHINE_USER_GITHUB_API_TOKEN@github.com/$org/$data_repo.git" -e COMMIT_MESSAGE="[Updater Bot] Regenerate data from https://github.com/$org/$engine_repo/pull/$(get_invokator_pr_number)" -e COMMIT_AND_PUSH='true' -e RUN_AS='root' pokeapi-updater
return_code=$?
if [ "$return_code" -eq 2 ]; then
cleanexit 'no-new-data' "Generated data is the same as old data, skipping deploy"
Expand Down

0 comments on commit bd6b4c8

Please sign in to comment.