dev mgirated to buildkit #9
@@ -18,7 +18,7 @@ jobs:
|
|||||||
needs: dockerfile_lint
|
needs: dockerfile_lint
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
DOCKER_HOST: tcp://localhost:2375 # unverschlüsselte Verbindung
|
DOCKER_HOST: tcp://localhost:2375 # DinD TCP ohne TLS
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -28,11 +28,6 @@ jobs:
|
|||||||
CLEANED_BRANCH_NAME=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | tr '/_' '-')
|
CLEANED_BRANCH_NAME=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | tr '/_' '-')
|
||||||
echo "CLEAN_BRANCH_NAME=${CLEANED_BRANCH_NAME}" >> $GITHUB_ENV
|
echo "CLEAN_BRANCH_NAME=${CLEANED_BRANCH_NAME}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
driver-opts: host=tcp://localhost:2375 # Verbindung ohne TLS
|
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -41,17 +36,15 @@ jobs:
|
|||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker image with Buildx
|
- name: Build and push Docker image with Buildx
|
||||||
env:
|
|
||||||
DOCKER_HOST: tcp://localhost:2375
|
|
||||||
run: |
|
run: |
|
||||||
# create builder instance
|
# create builder instance manually (no driver-opts)
|
||||||
docker buildx create --name mybuilder --use || true
|
docker buildx create --name mybuilder --use || true
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
# build and push
|
# build and push
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
--tag gitea.sikorski.cloud/rogersik/monica:${{ env.CLEAN_BRANCH_NAME }} \
|
--tag gitea.sikorski.cloud/rogersik/monica:${CLEAN_BRANCH_NAME} \
|
||||||
--cache-from=type=registry,ref=gitea.sikorski.cloud/rogersik/monica:cache \
|
--cache-from=type=registry,ref=gitea.sikorski.cloud/rogersik/monica:cache \
|
||||||
--cache-to=type=registry,ref=gitea.sikorski.cloud/rogersik/monica:cache,mode=max \
|
--cache-to=type=registry,ref=gitea.sikorski.cloud/rogersik/monica:cache,mode=max \
|
||||||
--push \
|
--push \
|
||||||
|
|||||||
Reference in New Issue
Block a user