From d50df32d4f16d15b0dacbf8d24795e5222827cbb Mon Sep 17 00:00:00 2001 From: Pushkinmazila2 Date: Mon, 6 Apr 2026 13:16:48 +0000 Subject: [PATCH] delet before push --- .github/workflows/docker relise | 242 ++++++++++++++++---------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/.github/workflows/docker relise b/.github/workflows/docker relise index dd5e54a..069ef71 100644 --- a/.github/workflows/docker relise +++ b/.github/workflows/docker relise @@ -1,146 +1,146 @@ -name: Docker Image CI 2 -on: - push: - tags: - - "*" - workflow_dispatch: + name: Docker Image CI 2 + on: + push: + tags: + - "*" + workflow_dispatch: -env: - IMAGE_NAME: ghcr.io/${{ github.repository }} + env: + IMAGE_NAME: ghcr.io/${{ github.repository }} -jobs: - frontend-build: - runs-on: ubuntu-24.04 + jobs: + frontend-build: + runs-on: ubuntu-24.04 - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - submodules: recursive + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + submodules: recursive - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: 20 + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: 20 - - name: Install dependencies and build frontend - run: | - cd frontend - npm ci - npm run build + - name: Install dependencies and build frontend + run: | + cd frontend + npm ci + npm run build - - name: Upload frontend build artifact - uses: actions/upload-artifact@v4 - with: - name: frontend-dist - path: frontend/dist/ + - name: Upload frontend build artifact + uses: actions/upload-artifact@v4 + with: + name: frontend-dist + path: frontend/dist/ - build: - needs: frontend-build - runs-on: ubuntu-24.04 + build: + needs: frontend-build + runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm64 + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 - steps: - - name: Checkout repository - uses: actions/checkout@v6 + steps: + - name: Checkout repository + uses: actions/checkout@v6 - - name: Download frontend build artifact - uses: actions/download-artifact@v4 - with: - name: frontend-dist - path: frontend_dist + - name: Download frontend build artifact + uses: actions/download-artifact@v4 + with: + name: frontend-dist + path: frontend_dist - - name: Set up QEMU - uses: docker/setup-qemu-action@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 - - name: Login to GHCR - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - tags: | - type=ref,event=tag - type=sha - type=raw,value=latest + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=ref,event=tag + type=sha + type=raw,value=latest - - name: Build and push by digest - id: build - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile.frontend-artifact - platforms: ${{ matrix.platform }} - labels: ${{ steps.meta.outputs.labels }} - outputs: type=image,push-by-digest=true,name-canonical=true,push=true + - name: Build and push by digest + id: build + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.frontend-artifact + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,push-by-digest=true,name-canonical=true,push=true - - name: Export digest - run: | - mkdir -p ${{ runner.temp }}/digests - digest="${{ steps.build.outputs.digest }}" - echo "${digest#sha256:}" > "${{ runner.temp }}/digests/${digest#sha256:}" + - name: Export digest + run: | + mkdir -p ${{ runner.temp }}/digests + digest="${{ steps.build.outputs.digest }}" + echo "${digest#sha256:}" > "${{ runner.temp }}/digests/${digest#sha256:}" - - name: Upload digest - uses: actions/upload-artifact@v4 - with: - name: digests-${{ matrix.platform }} - path: ${{ runner.temp }}/digests/* - retention-days: 1 + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ matrix.platform }} + path: ${{ runner.temp }}/digests/* + retention-days: 1 - merge: - needs: build - runs-on: ubuntu-24.04 + merge: + needs: build + runs-on: ubuntu-24.04 - steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: ${{ runner.temp }}/digests - pattern: digests-* - merge-multiple: true + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-* + merge-multiple: true - - name: Login to GHCR - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - tags: | - type=ref,event=tag - type=raw,value=latest + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=ref,event=tag + type=raw,value=latest - - name: Create manifest list and push - env: - DOCKER_METADATA_OUTPUT_JSON: ${{ steps.meta.outputs.json }} - working-directory: ${{ runner.temp }}/digests - run: | - set -e + - name: Create manifest list and push + env: + DOCKER_METADATA_OUTPUT_JSON: ${{ steps.meta.outputs.json }} + working-directory: ${{ runner.temp }}/digests + run: | + set -e - TAGS_ARGS=$(echo "$DOCKER_METADATA_OUTPUT_JSON" | jq -cr '.tags | map("-t " + .) | join(" ")') - DIGEST_REFS=$(for f in *; do echo -n "${{ env.IMAGE_NAME }}@sha256:$(cat "$f") "; done) + TAGS_ARGS=$(echo "$DOCKER_METADATA_OUTPUT_JSON" | jq -cr '.tags | map("-t " + .) | join(" ")') + DIGEST_REFS=$(for f in *; do echo -n "${{ env.IMAGE_NAME }}@sha256:$(cat "$f") "; done) - docker buildx imagetools create $TAGS_ARGS $DIGEST_REFS + docker buildx imagetools create $TAGS_ARGS $DIGEST_REFS