-
Notifications
You must be signed in to change notification settings - Fork 12
ci: rename CI-internal workflow inputs to *_EARTHBUILD_* #645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ inputs: | |
| description: 'The earthly version to use' | ||
| required: false | ||
| default: 'latest' | ||
| BUILT_EARTHLY_PATH: | ||
| BUILT_EARTHBUILD_PATH: | ||
| description: "Path to the built earthly binary" | ||
| required: true | ||
| BINARY: | ||
|
|
@@ -75,11 +75,11 @@ runs: | |
| if: steps.fork-check.outputs.is_fork == 'true' | ||
| shell: bash | ||
| run: | | ||
| test -n "${{inputs.BUILT_EARTHLY_PATH}}" || (echo "BUILT_EARTHLY_PATH is empty" && exit 1) | ||
| mkdir -p $(dirname "${{inputs.BUILT_EARTHLY_PATH}}") | ||
| cp ./fork-artifacts/earthly "${{inputs.BUILT_EARTHLY_PATH}}" | ||
| chmod +x "${{inputs.BUILT_EARTHLY_PATH}}" | ||
| echo "Earthly binary installed from artifact to ${{inputs.BUILT_EARTHLY_PATH}}" | ||
| test -n "${{inputs.BUILT_EARTHBUILD_PATH}}" || (echo "BUILT_EARTHBUILD_PATH is empty" && exit 1) | ||
| mkdir -p $(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The command substitution mkdir -p "$(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}")" |
||
| cp ./fork-artifacts/earthly "${{inputs.BUILT_EARTHBUILD_PATH}}" | ||
| chmod +x "${{inputs.BUILT_EARTHBUILD_PATH}}" | ||
| echo "Earthly binary installed from artifact to ${{inputs.BUILT_EARTHBUILD_PATH}}" | ||
|
|
||
| # Read the tag suffix and set EARTHLY_BUILDKIT_IMAGE env var for subsequent steps | ||
| TAG_SUFFIX=$(cat ./fork-artifacts/tag-suffix.txt) | ||
|
|
@@ -172,26 +172,26 @@ runs: | |
| if [ "${{inputs.USE_NEXT}}" = "true" ]; then export TAG="$TAG-ticktock"; fi | ||
| ${{inputs.SUDO}} ./earthly upgrade | ||
| ${{inputs.SUDO}} chown -R $USER ~/.earthly # restore non-sudo user ownership | ||
| test -n "${{inputs.BUILT_EARTHLY_PATH}}" || (echo "BUILT_EARTHLY_PATH is empty" && exit 1) | ||
| mkdir -p $(dirname "${{inputs.BUILT_EARTHLY_PATH}}") | ||
| test -n "${{inputs.BUILT_EARTHBUILD_PATH}}" || (echo "BUILT_EARTHBUILD_PATH is empty" && exit 1) | ||
| mkdir -p $(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ${{inputs.SUDO}} ls "${HOME}/.earthly/" | ||
| ${{inputs.SUDO}} mv "${HOME}/.earthly/earthly-$TAG" "${{inputs.BUILT_EARTHLY_PATH}}" | ||
| echo "extracted ${{inputs.BUILT_EARTHLY_PATH}}" | ||
| ${{inputs.SUDO}} mv "${HOME}/.earthly/earthly-$TAG" "${{inputs.BUILT_EARTHBUILD_PATH}}" | ||
| echo "extracted ${{inputs.BUILT_EARTHBUILD_PATH}}" | ||
| shell: bash | ||
| - run: |- | ||
| echo "Configuring earthbuild to use GCR mirror" | ||
| ${{inputs.BUILT_EARTHLY_PATH}} config global.buildkit_additional_config "'[registry.\"docker.io\"] | ||
| ${{inputs.BUILT_EARTHBUILD_PATH}} config global.buildkit_additional_config "'[registry.\"docker.io\"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| mirrors = [\"mirror.gcr.io\", \"public.ecr.aws\"]'" | ||
| shell: bash | ||
| - if: ${{ inputs.USE_NEXT == 'true' }} | ||
| run: |- | ||
| export expected_buildkit_client_sha="$(cat earthly-next | head -c 12)" | ||
| test -n "$expected_buildkit_client_sha" || ( echo "expected_buildkit_client_sha is empty" && exit 1) | ||
| (strings ${{inputs.BUILT_EARTHLY_PATH}} | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1) | ||
| (strings ${{inputs.BUILT_EARTHBUILD_PATH}} | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The binary path (strings "${{inputs.BUILT_EARTHBUILD_PATH}}" | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1) |
||
| echo "correctly found $expected_buildkit_client_sha in earthly binary; this confirms earthly-next was used" | ||
| shell: bash | ||
| - if: ${{ inputs.BINARY == 'podman' }} | ||
| run: ${{inputs.SUDO}} ${{inputs.BUILT_EARTHLY_PATH}} bootstrap | ||
| run: ${{inputs.SUDO}} ${{inputs.BUILT_EARTHBUILD_PATH}} bootstrap | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| shell: bash | ||
| - run: echo "stage2-setup action complete" | ||
| shell: bash | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on this comment, I would prefer EARTH instead of EARHBUILD.