From d3f50fedab5472c3238f7ce77c46cc3063fd41fa Mon Sep 17 00:00:00 2001 From: Shea Phillips Date: Fri, 6 Sep 2024 16:27:05 -0700 Subject: [PATCH] Adding some filtering so the build doesn't trigger for some non-code files. --- .github/workflows/build.yaml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7be66d0..2f008fa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,14 +3,18 @@ name: Build Image env: REGISTRY: ghcr.io REPOSITORY_NAME: developer-experience/developer-portal - + on: workflow_call: - + paths-ignore: + - 'catalog-info.yaml' + - '**/*.md' + - 'examples/**' + jobs: build: runs-on: ubuntu-latest - + steps: - name: Delete unnecessary files run: | @@ -18,10 +22,10 @@ jobs: sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - + - name: Checkout uses: actions/checkout@v4 - + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -29,7 +33,7 @@ jobs: images: ghcr.io/${{ github.repository_owner }}/${{ env.REPOSITORY_NAME }} # Always generate latest tag (https://github.com/docker/metadata-action#latest-tag) flavor: latest=true - # Sha tag is used in udpate_deploy_file job below + # Sha tag is used in udpate_deploy_file job below tags: | type=sha type=ref,event=pr @@ -39,15 +43,14 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - - # Support for multiplatform build. Using for dev debugging + - # Support for multiplatform build. Using for dev debugging name: Set up QEMU uses: docker/setup-qemu-action@v3 - + - # Support for multiplatform build. Using for dev debugging name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Build container uses: docker/build-push-action@v6 with: @@ -55,8 +58,6 @@ jobs: file: packages/backend/Dockerfile push: true platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} cache-from: type=gha cache-to: type=gha,mode=max - - \ No newline at end of file