ci: use node:20-alpine with docker-cli for runner compatibility
Some checks failed
Build & Push Docker Image / build (push) Failing after 3s
Some checks failed
Build & Push Docker Image / build (push) Failing after 3s
This commit is contained in:
@@ -9,27 +9,30 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Docker CLI
|
||||
run: apk add --no-cache docker-cli
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.mischlabs.de
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- name: Login to Gitea Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | \
|
||||
docker login git.mischlabs.de \
|
||||
-u "${{ secrets.REGISTRY_USER }}" \
|
||||
--password-stdin
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg NEXT_PUBLIC_API_URL="${{ vars.NEXT_PUBLIC_API_URL }}" \
|
||||
--build-arg NEXT_PUBLIC_APP_URL="${{ vars.NEXT_PUBLIC_APP_URL }}" \
|
||||
-t git.mischlabs.de/mrdiderot/michess:latest \
|
||||
.
|
||||
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.mischlabs.de/mrdiderot/michess:latest
|
||||
build-args: |
|
||||
NEXT_PUBLIC_API_URL=${{ vars.NEXT_PUBLIC_API_URL }}
|
||||
NEXT_PUBLIC_APP_URL=${{ vars.NEXT_PUBLIC_APP_URL }}
|
||||
cache-from: type=registry,ref=git.mischlabs.de/mrdiderot/michess:buildcache
|
||||
cache-to: type=registry,ref=git.mischlabs.de/mrdiderot/michess:buildcache,mode=max
|
||||
- name: Push to Registry
|
||||
run: docker push git.mischlabs.de/mrdiderot/michess:latest
|
||||
|
||||
- name: Logout
|
||||
if: always()
|
||||
run: docker logout git.mischlabs.de
|
||||
|
||||
Reference in New Issue
Block a user