Skip to content

Optimize Docker build context to fix slow compose up times in Copilot sessions #363

Optimize Docker build context to fix slow compose up times in Copilot sessions

Optimize Docker build context to fix slow compose up times in Copilot sessions #363

Workflow file for this run

---
on:
pull_request:
branches:
- master
- main
paths:
- '_posts/**'
- 'content/**'
- 'assets/**'
- 'src/**'
- 'index.md'
- '_includes/**'
- '_data/**'
- '_image_sources/**'
- 'galleries/**'
- 'navigation_and_indexes/**'
- 'products/**'
- '.github/workflows/on_push_to_master_test_and_deploy.yaml'
- '.github/workflows/on_call_build_site.yaml'
- '.github/workflows/on_call_staging_test.yaml'
- 'package.json'
- 'package-lock.json'
- 'webpack.config.js'
- 'favicon.png'
- '.eleventy.*'
- '_config.yml'
- 'google*.html'
- 'ads.txt'
- 'Dockerfile'
- 'docker-compose.yml'
jobs:
detect_base_image_changes:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changes.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
- name: Check for base image related changes
# tj-actions/changed-files v44.5.7
uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c
id: changes
with:
files: |
Dockerfile
package.json
package-lock.json
.github/workflows/on_call_build_site.yaml
.github/workflows/on_pr_test.yaml
build_site:
needs: detect_base_image_changes
uses: ./.github/workflows/on_call_build_site.yaml
with:
push_tag: >-
${{ needs.detect_base_image_changes.outputs.changed == 'true'
&& github.event.number || '' }}
staging_test:
uses: ./.github/workflows/on_call_staging_test.yaml
needs: build_site