diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index fa33b79a3..769017b74 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -1,17 +1,29 @@ name: Build and Push Docker Image on: - push: - branches: - - main - - master - workflow_dispatch: + push: + branches: + - master + paths-ignore: + - 'scripts/**' + - '.gitignore' + - '.github/**' + - 'book/**' + workflow_dispatch: + +concurrency: build_docker jobs: build-and-push: runs-on: ubuntu-latest steps: - # 1. Log into GitHub Container Registry + # 1. Check out the repository to get the Dockerfile + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + # 2. Log into GitHub Container Registry - name: Log in to GHCR uses: docker/login-action@v2 with: @@ -19,7 +31,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # 2. Build and push + # 3. Build and push - name: Build and push Docker image run: | # Define image name