ci: replace actions/checkout with native git clone
CI/CD Pipeline / build-and-deploy (push) Failing after 1s
CI/CD Pipeline / build-and-deploy (push) Failing after 1s
This commit is contained in:
@@ -7,11 +7,11 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
|
||||||
image: docker:cli
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Clone code
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
git clone https://git.plfai.cn/test/fastapi-demo.git .
|
||||||
|
git checkout ${GITHUB_SHA}
|
||||||
|
|
||||||
- name: Docker Build
|
- name: Docker Build
|
||||||
run: |
|
run: |
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
docker push registry.plfai.cn/fastapi-demo:${GITHUB_SHA:0:7}
|
docker push registry.plfai.cn/fastapi-demo:${GITHUB_SHA:0:7}
|
||||||
docker push registry.plfai.cn/fastapi-demo:latest
|
docker push registry.plfai.cn/fastapi-demo:latest
|
||||||
|
|
||||||
- name: Deploy
|
- name: ArgoCD Sync
|
||||||
run: |
|
run: |
|
||||||
curl -sk -o /dev/null -X POST \
|
curl -sk -o /dev/null -X POST \
|
||||||
-H "Authorization: Bearer ${{ secrets.ARGOCD_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.ARGOCD_TOKEN }}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user