Skip to content

Commit

Permalink
updated entrypoint.sh and action.yml for devtron repo
Browse files Browse the repository at this point in the history
  • Loading branch information
pawan-59 committed Sep 16, 2021
1 parent cc950bc commit ef9afc7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
target-token:
description: 'Target Token'
required: true
target-useremail:
description: 'Target Repo UserEmail'
required: true
runs:
using: "composite"
steps:
Expand All @@ -25,3 +28,4 @@ runs:
INPUT_TARGET_USERNAME: ${{ inputs.target-username }}
INPUT_TARGET_TOKEN: ${{ inputs.target-token }}
GITHUB_EVENT_REF: ${{ github.event.ref }}
INPUT_TARGET_USEREMAIL: ${{ inputs.target-useremail }}
32 changes: 15 additions & 17 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
git clone https://github.com/devtron-labs/devtron.git
cd devtron
git remote add target https://${INPUT_TARGET_USERNAME}:${INPUT_TARGET_TOKEN}@${INPUT_TARGET_URL#https://}

git checkout main
git remote -v

sed -i "s/LTAG=.*/LTAG=\"main\";/" manifests/installation-script

sed -i "s/REPO_RAW_URL=.*/REPO_RAW_URL= https:\/\/gitee.com\/devtron-labs\/devtron\/raw/" manifests/installation-script
Expand All @@ -14,20 +19,13 @@ sed -i "103 s/value:.*/value: https:\/\/gitee.com\/devtron-labs\/git-sensor.git/

sed -i "141 s/value:.*/value: https:\/\/gitee.com\/devtron-labs\/lens.git/" manifests/yamls/migrator.yaml

git config --global user.email "pawan@devtron.ai"
git config --global user.name "pawan_06d2"

git commit -am "updated github link to gitee"

case "${GITHUB_EVENT_NAME}" in
push)
git push -f --all target
git push -f --tags target
;;
delete)
git push -d target ${GITHUB_EVENT_REF}
;;
*)
break
;;
esac
git config --global user.email ${INPUT_TARGET_USEREMAIL}

git config --global user.name ${INPUT_TARGET_USERNAME}


git add .
git commit -m "updated github link to gitee"

git push -f --all target

0 comments on commit ef9afc7

Please sign in to comment.