From 727bfb951d3fb502e711f53ea6a1a96c18815249 Mon Sep 17 00:00:00 2001 From: h3rt <94856309+SecretSaturn@users.noreply.github.com> Date: Sun, 29 Sep 2024 03:09:01 +0200 Subject: [PATCH] GH Docker image 1 --- .github/workflows/Docker_image.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Docker_image.yml b/.github/workflows/Docker_image.yml index 98ed027..9ec6f04 100644 --- a/.github/workflows/Docker_image.yml +++ b/.github/workflows/Docker_image.yml @@ -21,7 +21,7 @@ jobs: env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - IMAGE_NAME: secretpath + IMAGE_NAME: secretpath IMAGE_TAG: latest steps: @@ -29,14 +29,15 @@ jobs: uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')" \ - -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - docker-compose version + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -46,5 +47,7 @@ jobs: - name: Build and Push Docker Image run: | - docker-compose build - docker-compose push + docker compose build --pull + docker compose push + env: + DOCKER_BUILDKIT: 1