diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 4ab0018..1c8797a 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -8,32 +8,32 @@ on: jobs: build-and-deploy: runs-on: docker + container: + image: docker:dind + options: --privileged steps: + - name: Set Up Node + run: apk add --no-cache nodejs + - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Docker - run: | - sh -c "curl -fsSL https://get.docker.com | bash" - service docker start - - - name: Login to Docker Registry - uses: docker/login-action@v3 - with: - registry: git.neur0tx.site - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: git.neur0tx.site/${{ github.repository_owner }}/${{ github.repository_name }}:latest - + run: | + dockerd-entrypoint.sh & + + until docker info > /dev/null 2>&1; do + echo "Waiting for Docker daemon..." + sleep 1 + done + + echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.neur0tx.site -u "${{ github.actor }}" --password-stdin + docker build -t git.neur0tx.site/${{ github.repository_owner }}/${{ github.repository_name }}:latest . + docker push git.neur0tx.site/${{ github.repository_owner }}/${{ github.repository_name }}:latest + - name: Deploy if: ${{ success() }} + container: alpine:latest run: | - apt-get install -y --no-install-recommends curl - curl -H "${{ secrets.DEPLOYER_AUTH }}" ${{ secrets.DEPLOYER_URL }} - container: alpine:latest \ No newline at end of file + apk add --no-cache curl + curl -H "${{ secrets.DEPLOYER_AUTH }}" ${{ secrets.DEPLOYER_URL }} \ No newline at end of file