Skip to content

Commit

Permalink
Adding some filtering so the build doesn't trigger for some non-code …
Browse files Browse the repository at this point in the history
…files.
  • Loading branch information
sheaphillips committed Sep 6, 2024
1 parent d6aff06 commit d3f50fe
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,37 @@ 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: |
sudo rm -rf /usr/share/dotnet
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
with:
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
Expand All @@ -39,24 +43,21 @@ 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:
context: .
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


0 comments on commit d3f50fe

Please sign in to comment.