diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8e5878..ddd36f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,28 +28,6 @@ jobs: - uses: pre-commit-ci/lite-action@v1.0.3 if: always() - docker: - name: Build and push testing Docker image - needs: pre_commit - runs-on: ubuntu-latest - steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - push: true - tags: ${{ env.IMAGE_TAG_TESTING }} - cache-from: type=registry,ref=${{ env.IMAGE_TAG_TESTING }} - cache-to: type=inline - source: name: Extract example source files needs: pre_commit @@ -67,13 +45,28 @@ jobs: ./justfile if-no-files-found: error - render: - name: Render default files and update Docker tags - needs: - - docker - - source + docker: + name: Build and push testing Docker image + needs: source runs-on: ubuntu-latest steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and export to Docker + uses: docker/build-push-action@v6 + with: + load: true + tags: ${{ env.IMAGE_TAG_TESTING }} + cache-from: type=registry,ref=${{ env.IMAGE_TAG }} + cache-to: type=inline + - name: Download source files uses: actions/download-artifact@v4 with: @@ -99,14 +92,17 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Update Docker tag - run: | - docker image tag ${{ env.IMAGE_TAG_TESTING }} ${{ env.IMAGE_TAG }} - docker image push ${{ env.IMAGE_TAG }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ env.IMAGE_TAG }} + cache-from: type=registry,ref=${{ env.IMAGE_TAG }} + cache-to: type=inline publish: name: Publish to GitHub pages - needs: render + needs: docker runs-on: ubuntu-latest permissions: contents: write