From 604a3516722f6d6e89c530ef164d02808d15844d Mon Sep 17 00:00:00 2001 From: Joel Bennett Date: Tue, 31 Oct 2023 20:47:06 -0400 Subject: [PATCH] Another attempt to earthly +build --- .github/workflows/build.yaml | 9 ++++----- Build.build.ps1 | 1 + Earthfile | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 98a584e..23fb2f8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,8 +10,6 @@ jobs: build: runs-on: ubuntu-latest env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} FORCE_COLOR: 1 steps: - uses: earthly/actions-setup@v1 @@ -20,6 +18,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + fetch-depth: 0 - name: Put back the git branch into git (Earthly uses it for tagging) run: | branch="" @@ -29,10 +28,10 @@ jobs: branch="${GITHUB_REF##*/}" fi git checkout -b "$branch" || true - - name: Earthly version - run: earthly --version - - name: Run build + + - name: earthly +build run: earthly +build + - name: Upload Build Output uses: actions/upload-artifact@v2 with: diff --git a/Build.build.ps1 b/Build.build.ps1 index 0fbcd5c..90bb2fd 100644 --- a/Build.build.ps1 +++ b/Build.build.ps1 @@ -37,6 +37,7 @@ param( } ) $InformationPreference = "Continue" +$ErrorView = 'DetailedView' # The name of the module to publish $script:PSModuleName = "TerminalBlocks" diff --git a/Earthfile b/Earthfile index 3b9dbc9..45cd86a 100644 --- a/Earthfile +++ b/Earthfile @@ -25,16 +25,16 @@ deps: # So the dependency cach only re-builds when you add a new dependency COPY RequiredModules.psd1 . COPY *.csproj . - RUN ["pwsh", "--file", "/Tasks/_Bootstrap.ps1", "-RequiredModulesPath", "RequiredModules.psd1", "-Verbose"] + RUN ["pwsh", "--file", "/Tasks/_Bootstrap.ps1", "-RequiredModulesPath", "RequiredModules.psd1"] # Install-RequiredModule does not support pre-release modules - RUN ["pwsh", "--command", "Update-Module", "ModuleBuilder", "-AllowPreRelease", "-Verbose"] + RUN ["pwsh", "--command", "Update-Module", "ModuleBuilder", "-AllowPreRelease"] build: FROM +deps RUN mkdir $OUTPUT_ROOT $TEST_ROOT $TEMP_ROOT COPY . . # make sure you have bin and obj in .earthlyignore, as their content from context might cause problems - RUN ["pwsh", "--command", "Invoke-Build", "-Task", "Build", "-File", "Build.build.ps1", "-Verbose"] + RUN ["pwsh", "--command", "Invoke-Build", "-Task", "Build", "-File", "Build.build.ps1"] # SAVE ARTIFACT [--keep-ts] [--keep-own] [--if-exists] [--force] [] [AS LOCAL ] SAVE ARTIFACT $OUTPUT_ROOT/$MODULE_NAME AS LOCAL ./output/$MODULE_NAME @@ -43,7 +43,7 @@ test: FROM +build COPY . . # make sure you have bin and obj in .earthlyignore, as their content from context might cause problems - RUN ["pwsh", "--command", "Invoke-Build", "-Task", "Test", "-File", "Build.build.ps1", "-Verbose"] + RUN ["pwsh", "--command", "Invoke-Build", "-Task", "Test", "-File", "Build.build.ps1"] # SAVE ARTIFACT [--keep-ts] [--keep-own] [--if-exists] [--force] [] [AS LOCAL ] SAVE ARTIFACT $TEST_ROOT AS LOCAL ./output/tests