ci(docker): drop docker/login-action and build-push-action

These actions' tarballs are downloaded from api.github.com, and downloads
from our runner's network intermittently time out past the 100s
HttpClient limit. The job then fails after 3 retries. Replace them with
plain docker CLI commands: system docker already has buildx (via apt)
and can login + push to ghcr.io directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
nurdotnet 2026-04-23 00:06:29 +05:00
parent 29cefb64be
commit a17ca1b90c

View file

@ -25,23 +25,20 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: docker/login-action@v3 - name: Login to ghcr
with: env:
registry: ghcr.io TOKEN: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }} ACTOR: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} run: echo "$TOKEN" | docker login ghcr.io -u "$ACTOR" --password-stdin
- name: Build + push - name: Build + push api
uses: docker/build-push-action@v6 env:
with: OWNER: ${{ github.repository_owner }}
context: . SHA: ${{ github.sha }}
file: deploy/Dockerfile.api run: |
push: true docker build -f deploy/Dockerfile.api -t ghcr.io/$OWNER/food-market-api:$SHA -t ghcr.io/$OWNER/food-market-api:latest .
tags: | docker push ghcr.io/$OWNER/food-market-api:$SHA
ghcr.io/${{ github.repository_owner }}/food-market-api:latest docker push ghcr.io/$OWNER/food-market-api:latest
ghcr.io/${{ github.repository_owner }}/food-market-api:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
web: web:
name: Web image name: Web image
@ -49,20 +46,17 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: docker/login-action@v3 - name: Login to ghcr
with: env:
registry: ghcr.io TOKEN: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }} ACTOR: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} run: echo "$TOKEN" | docker login ghcr.io -u "$ACTOR" --password-stdin
- name: Build + push - name: Build + push web
uses: docker/build-push-action@v6 env:
with: OWNER: ${{ github.repository_owner }}
context: . SHA: ${{ github.sha }}
file: deploy/Dockerfile.web run: |
push: true docker build -f deploy/Dockerfile.web -t ghcr.io/$OWNER/food-market-web:$SHA -t ghcr.io/$OWNER/food-market-web:latest .
tags: | docker push ghcr.io/$OWNER/food-market-web:$SHA
ghcr.io/${{ github.repository_owner }}/food-market-web:latest docker push ghcr.io/$OWNER/food-market-web:latest
ghcr.io/${{ github.repository_owner }}/food-market-web:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max