diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c2d0cb8..6fdfed2 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -24,58 +24,44 @@ jobs: run: echo "TAG=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT - name: Log in to registry - uses: docker/login-action@v3 - with: - registry: git.chemavx.xyz - username: chemavx - password: ${{ secrets.CI_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver: docker-container - driver-opts: network=host - buildkitd-config-inline: | - [registry."git.chemavx.xyz"] - http = true - insecure = true - - [registry."docker.io"] - mirrors = ["registry-cache.registry-cache.svc.cluster.local:5000"] - - [registry."registry-cache.registry-cache.svc.cluster.local:5000"] - http = true - insecure = true + run: echo "${{ secrets.CI_TOKEN }}" | docker login git.chemavx.xyz -u chemavx --password-stdin - name: Build and push bot image - uses: docker/build-push-action@v3 - with: - context: . - file: Dockerfile - push: true - tags: git.chemavx.xyz/chemavx/polymarket-bot:${{ steps.tag.outputs.TAG }} - cache-from: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot:buildcache - cache-to: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot:buildcache,mode=max + run: | + TAG=${{ steps.tag.outputs.TAG }} + docker build \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --cache-from git.chemavx.xyz/chemavx/polymarket-bot:buildcache \ + -t git.chemavx.xyz/chemavx/polymarket-bot:${TAG} \ + -t git.chemavx.xyz/chemavx/polymarket-bot:buildcache \ + -f Dockerfile . + docker push git.chemavx.xyz/chemavx/polymarket-bot:${TAG} + docker push git.chemavx.xyz/chemavx/polymarket-bot:buildcache - name: Build and push API image - uses: docker/build-push-action@v3 - with: - context: . - file: Dockerfile.api - push: true - tags: git.chemavx.xyz/chemavx/polymarket-bot-api:${{ steps.tag.outputs.TAG }} - cache-from: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache - cache-to: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache,mode=max + run: | + TAG=${{ steps.tag.outputs.TAG }} + docker build \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --cache-from git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache \ + -t git.chemavx.xyz/chemavx/polymarket-bot-api:${TAG} \ + -t git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache \ + -f Dockerfile.api . + docker push git.chemavx.xyz/chemavx/polymarket-bot-api:${TAG} + docker push git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache - name: Build and push dashboard image - uses: docker/build-push-action@v3 - with: - context: dashboard - file: dashboard/Dockerfile - push: true - tags: git.chemavx.xyz/chemavx/polymarket-bot-dashboard:${{ steps.tag.outputs.TAG }} - cache-from: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache - cache-to: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache,mode=max + run: | + TAG=${{ steps.tag.outputs.TAG }} + docker build \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --cache-from git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache \ + -t git.chemavx.xyz/chemavx/polymarket-bot-dashboard:${TAG} \ + -t git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache \ + -f dashboard/Dockerfile \ + dashboard + docker push git.chemavx.xyz/chemavx/polymarket-bot-dashboard:${TAG} + docker push git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache - name: Update k8s manifests run: |