From f402414c0ffe3377193a82905a14fef4112f7611 Mon Sep 17 00:00:00 2001 From: IvayloRashkov <47078490+ivorashkov@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:01:04 +0200 Subject: [PATCH] Update pipeline.yml adjusting pipeline syntax --- .github/workflows/pipeline.yml | 41 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 708bbf4626..091df1bfcb 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,4 +1,5 @@ -name:CI-Build +name: CI-Build + on: pull_request: types: [closed] @@ -9,30 +10,30 @@ jobs: if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CI:Build') runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 + steps: + - name: Checkout repository + uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - 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 Docker Hub Container Registry - uses: docker/login-action@v3 + - name: Cache Docker layers + uses: actions/cache@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - - name: Build and push in Docker Hub Registry + - name: Log in to Docker Hub Container Registry + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} # Ensure your Docker Hub username is stored as a secret + password: ${{ secrets.DOCKERHUB_TOKEN }} # Ensure your Docker Hub token is stored as a secret + + - name: Build and push Docker image to Docker Hub Registry uses: docker/build-push-action@v6 with: context: . push: true - tags: user/app:latest + tags: user/app:latest # Replace 'user/app' with your Docker Hub repository name