Skip to content
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

Clean up downloaded assets after verification and install #193

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jan 23, 2024

Downstream actions, such as goreleaser/goreleaser-action expect the workspace directory to be clean, otherwise an error is thrown:

  • starting release...
  • loading                                          path=.goreleaser.yml
  • loading environment variables
    • using token from $GITHUB_TOKEN
  • getting and validating git state
    • git state                                      commit=ae346ceb6430b05e78d73a47b3975658f43ffa50 branch=HEAD current_tag=v2.4.2 previous_tag=v2.4.1 dirty=true
  ⨯ release failed after 0s                  error=git is in a dirty state
Please check in your pipeline what can be changing the following files:
?? hc-releases_0.1.15_SHA256SUMS
?? hc-releases_0.1.15_linux_amd64.zip

Learn more at https://goreleaser.com/errors/dirty

Downstream actions, such as `goreleaser/goreleaser-action` expect the workspace directory to be clean, otherwise an error is thrown:

```
  • starting release...
  • loading                                          path=.goreleaser.yml
  • loading environment variables
    • using token from $GITHUB_TOKEN
  • getting and validating git state
    • git state                                      commit=ae346ceb6430b05e78d73a47b3975658f43ffa50 branch=HEAD current_tag=v2.4.2 previous_tag=v2.4.1 dirty=true
  ⨯ release failed after 0s                  error=git is in a dirty state
Please check in your pipeline what can be changing the following files:
?? hc-releases_0.1.15_SHA256SUMS
?? hc-releases_0.1.15_linux_amd64.zip

Learn more at https://goreleaser.com/errors/dirty
```
@bflad bflad requested review from a team, shore and jeanneryan January 23, 2024 15:00
@@ -55,7 +55,6 @@ sums_name="hc-releases_${version}_SHA256SUMS"
echo "Installing release $version"

# download
/bin/rm -vf "$sums_name" "hc-releases_${version}_${pattern}" # remove in case they already exist from previous invocation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still needed unless the gh release download ... commands below get --clobber.
(When this was written, self-hosted runners had an older version of gh that didn't support --clobber and jobs that used the action twice would fail to download the second time around.)

Copy link
Contributor

@shore shore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@shore shore merged commit a86464c into main Jan 23, 2024
3 checks passed
@shore shore deleted the bflad/remove-download-assets branch January 23, 2024 17:11
bflad added a commit to hashicorp/ghaction-terraform-provider-release that referenced this pull request Jan 23, 2024
bflad added a commit to hashicorp/ghaction-terraform-provider-release that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants