From cea8ebab98e8db350b603cef5eb910bfdad00356 Mon Sep 17 00:00:00 2001 From: Punit Arani Date: Sat, 27 Jul 2024 23:45:56 -0700 Subject: [PATCH] Remove caching in docker-image.yml --- .github/workflows/docker-image.yml | 35 +++++++----------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3dcde8d..80e1e93 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,28 +15,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.12 - uses: actions/setup-python@v4 - with: - python-version: '3.12' - - - name: Set up cache for Poetry - uses: actions/cache@v3 - with: - path: | - ~/.cache/pypoetry - ~/.cache/pip - key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} - restore-keys: | - ${{ runner.os }}-poetry- - - - name: Install Poetry - run: | - pip install poetry - poetry --version - - - name: Install dependencies - run: poetry install --no-dev --no-interaction --no-ansi + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -44,8 +24,9 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build the Docker image - run: docker build . --file Dockerfile --tag punitarani/axiom:latest - - - name: Push the Docker image - run: docker push punitarani/axiom:latest + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: punitarani/axiom:latest