-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/opentelemetry-js-monorepo
- Loading branch information
Showing
2 changed files
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ on: | |
type: boolean | ||
version: | ||
description: The version used when tagging the image | ||
default: dev | ||
default: 'dev' | ||
required: false | ||
type: string | ||
|
||
|
@@ -101,23 +101,22 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check for file changes | ||
- name: Check for changes and set push options | ||
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 | ||
FORCE_PUSH=${{ inputs.push }} | ||
if [ "$FORCE_PUSH" = true ]; then | ||
echo "Force push is enabled, proceeding with build." | ||
echo "skip='false'" >> "$GITHUB_OUTPUT" | ||
elif [ -z "$FILES_CHANGED" ]; then | ||
echo "No changes in ${{ matrix.file_tag.context }}, skipping build." | ||
echo "skip=true" >> "$GITHUB_OUTPUT" | ||
echo "skip='true'" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build." | ||
echo "skip=false" >> "$GITHUB_OUTPUT" | ||
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@v3 | ||
with: | ||
|
@@ -142,7 +141,7 @@ jobs: | |
[worker.oci] | ||
max-parallelism = 2 | ||
- name: Matrix Build and push demo images | ||
if: steps.check_changes.outputs.skip == 'false' || steps.override_skip.outputs.skip == 'false' | ||
if: steps.check_changes.outputs.skip == 'false' | ||
uses: docker/[email protected] | ||
with: | ||
context: ${{ matrix.file_tag.context }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters