Skip to content

Commit

Permalink
Merge branch 'main' into renovate/config-no-service
Browse files Browse the repository at this point in the history
  • Loading branch information
cartersocha committed Aug 20, 2023
2 parents c661ec5 + d7e31d9 commit 1c3ee8e
Show file tree
Hide file tree
Showing 3 changed files with 865 additions and 421 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

on:
push:
paths:
- 'src/**'
- 'test/**'
workflow_call:
inputs:
push:
Expand Down Expand Up @@ -93,35 +98,48 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check for file changes
id: check_changes
if: ${{ !inputs.push }}
run: |
DOCKERFILE_DIR=$(dirname ${{ matrix.file_tag.file }})
FILES_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- $DOCKERFILE_DIR)
if [ -z "$FILES_CHANGED" ]; then
echo "No changes in ${{ matrix.file_tag.context }}, skipping build."
echo "skip=true >> $GITHUB_OUTPUT"
else
echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build."
echo "skip=false >> $GITHUB_OUTPUT"
fi
- name: Override skip for push
if: ${{ inputs.push }}
run: echo "skip=false >> $GITHUB_OUTPUT"
id: override_skip
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ inputs.push }}

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ inputs.push }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:master

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[worker.oci]
max-parallelism = 2
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false' || steps.override_skip.outputs.skip == 'false'
uses: docker/[email protected]
with:
context: ${{ matrix.file_tag.context }}
Expand Down
Loading

0 comments on commit 1c3ee8e

Please sign in to comment.