@@ -49,23 +49,44 @@ jobs:
4949 uses : actions/checkout@v3
5050
5151 - name : Set up Docker
52- uses : docker/setup-docker-action@v4
53-
54- - name : Log in to the Container registry
55- uses : docker/login-action@v3
52+ uses : nxtcoder17/actions/setup-docker@main
5653 with :
57- registry : ${{ env.REGISTRY_URL }}
58- username : ${{ env.REGISTRY_USERNAME }}
59- password : ${{ env.REGISTRY_PASSWORD }}
54+ docker_registry : ${{ env.REGISTRY_URL }}
55+ docker_username : ${{ env.REGISTRY_USERNAME }}
56+ docker_password : ${{ env.REGISTRY_PASSWORD }}
57+
58+ # - name: Log in to the Container registry
59+ # uses: docker/login-action@v3
60+ # with:
61+ # registry: ${{ env.REGISTRY_URL }}
62+ # username: ${{ env.REGISTRY_USERNAME }}
63+ # password: ${{ env.REGISTRY_PASSWORD }}
64+
65+ # - name: Build Image
66+ # id: build_image
67+ # shell: bash
68+ # env:
69+ # IMAGE: "ghcr.io/${{ github.repository}}:${{matrix.fedora_version}}"
70+ # run: |+
71+ # docker buildx build \
72+ # -t $IMAGE -f ./Containerfile . --build-arg FEDORA_VERSION=${{ matrix.fedora_version }}
73+ # docker push $IMAGE
6074
6175 - name : Build Image
6276 id : build_image
6377 shell : bash
6478 env :
6579 IMAGE : " ghcr.io/${{ github.repository}}:${{matrix.fedora_version}}"
80+ buildx_cache_master : " ghcr.io/${{ github.repository }}:buildx-cache-master"
81+ buildx_cache : " ghcr.io/${{ github.repository }}:buildx-cache-master"
6682 run : |+
67- docker build -t $IMAGE -f ./Containerfile . --build-arg FEDORA_VERSION=${{ matrix.fedora_version }}
68- docker push $IMAGE
83+ docker buildx build -t $IMAGE -f ./Containerfile \
84+ --build-arg FEDORA_VERSION="${{ matrix.fedora_version }}" \
85+ --cache-to type=registry,ref="$buildx_cache",mode=max,compression=zstd,compression-level=13,force-compression=true \
86+ --cache-from type=registry,ref="$buildx_cache" \
87+ --cache-from type=registry,ref="$buildx_cache_master" \
88+ --output=type=image,compression=zstd,force-compression=true,compression-level=13,push=true \
89+ .
6990
7091 # - name: Build Image
7192 # id: build_image
0 commit comments