ci: fix divergent branches by reset --hard origin/main
Some checks failed
Build & Deploy Go API / build (push) Failing after 14s
Some checks failed
Build & Deploy Go API / build (push) Failing after 14s
This commit is contained in:
@@ -19,8 +19,12 @@ jobs:
|
||||
WORK=/root/.cache/demo-go-api
|
||||
mkdir -p $WORK
|
||||
cd $WORK
|
||||
[ -d .git ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-go-api.git .
|
||||
git pull
|
||||
if [ -d .git ]; then
|
||||
git reset --hard origin/main
|
||||
git clean -fd
|
||||
else
|
||||
git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-go-api.git .
|
||||
fi
|
||||
|
||||
- name: Login to Harbor
|
||||
run: docker login 192.168.1.212:1180 -u admin -p "$HARBOR_PASSWORD"
|
||||
|
||||
Reference in New Issue
Block a user