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
|
WORK=/root/.cache/demo-go-api
|
||||||
mkdir -p $WORK
|
mkdir -p $WORK
|
||||||
cd $WORK
|
cd $WORK
|
||||||
[ -d .git ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-go-api.git .
|
if [ -d .git ]; then
|
||||||
git pull
|
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
|
- name: Login to Harbor
|
||||||
run: docker login 192.168.1.212:1180 -u admin -p "$HARBOR_PASSWORD"
|
run: docker login 192.168.1.212:1180 -u admin -p "$HARBOR_PASSWORD"
|
||||||
|
|||||||
Reference in New Issue
Block a user