diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83b0b01..f4f3d7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,11 @@ jobs: run_quiet apt install --yes gh gh --version + # Create a marker we can use later to verify no files were added to the working directory. + # Extra files make goreleaser anxious. + - name: Create Marker File + run: touch "${RUNNER_TEMP}/pre-install-marker" + - name: Install bob uses: ./ id: install @@ -47,6 +52,16 @@ jobs: tag: ${{ matrix.tag }} github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} + # Find anything in the working directory newer than the marker created above + - name: Check For New Files + run: | + if [ "$(find "$PWD" -newer "${RUNNER_TEMP}/pre-install-marker" | wc -l | xargs)" -gt 0 ]; then + echo "::error::Unexpected files left in working directory" + find "$PWD" -newer "${RUNNER_TEMP}/pre-install-marker" + exit 1 + fi + echo "No unexpected files found." + - name: Test reported version env: GH_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} diff --git a/action.yml b/action.yml index e40856a..36e415e 100644 --- a/action.yml +++ b/action.yml @@ -32,5 +32,4 @@ runs: id: capture shell: bash run: | - bob -version | tee .version_check - echo "installed_version=$(< .version_check)" >> "$GITHUB_OUTPUT" + echo "installed_version=$(bob -version)" | tee -a "$GITHUB_OUTPUT"