fix main branch lock in deploy
This commit is contained in:
@@ -82,9 +82,11 @@ jobs:
|
|||||||
cd "/app-cache/${{ gitea.repository }}"
|
cd "/app-cache/${{ gitea.repository }}"
|
||||||
if [ ! -d .git ]; then
|
if [ ! -d .git ]; then
|
||||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
||||||
else
|
|
||||||
git pull origin main
|
|
||||||
fi
|
fi
|
||||||
|
git fetch --prune origin ${{ gitea.ref_name }}
|
||||||
|
git checkout -f FETCH_HEAD
|
||||||
|
git reset --hard FETCH_HEAD
|
||||||
|
git clean -fdx
|
||||||
printf 'REGISTRY=%s\nIMAGE_PREFIX=%s\n' \
|
printf 'REGISTRY=%s\nIMAGE_PREFIX=%s\n' \
|
||||||
'${{ env.REGISTRY }}' \
|
'${{ env.REGISTRY }}' \
|
||||||
'${{ needs.build-app.outputs.IMAGE_PREFIX }}' > .env
|
'${{ needs.build-app.outputs.IMAGE_PREFIX }}' > .env
|
||||||
|
|||||||
Reference in New Issue
Block a user