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

docker.yml: Set persist-credentials: false #7506

Merged
merged 1 commit into from
May 4, 2020

Conversation

sjackman
Copy link
Contributor

@sjackman sjackman commented May 4, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Aesthetic change only.

@sjackman sjackman self-assigned this May 4, 2020
@sjackman sjackman requested review from MikeMcQuaid and jonchang May 4, 2020 23:17
@sjackman sjackman merged commit e10e955 into Homebrew:master May 4, 2020
@sjackman sjackman deleted the docker branch May 4, 2020 23:46
git fetch origin master
persist-credentials: false
- name: Fetch origin/master from Git
run: git fetch origin master
Copy link
Member

Choose a reason for hiding this comment

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

Why are actions/checkout and git fetch origin master both needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe it fetches branch refs, even with fetch-depth: 0

Copy link
Member

Choose a reason for hiding this comment

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

In that case I'd suggest doing something like this: https://github.com/actions/checkout#Fetch-all-branches

Copy link
Contributor Author

@sjackman sjackman May 5, 2020

Choose a reason for hiding this comment

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

Why? We don't need all branches, just origin/master. I prefer the simplest command that does the job. I'm addressing this specific error:

$ docker run -it --rm docker.pkg.github.com/homebrew/brew/ubuntu20.04:2.2.15
$ brew update
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.

Copy link
Member

Choose a reason for hiding this comment

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

+refs/heads/#{ENV["GITHUB_BASE_REF"]} is the refspec you want. It would be nice to combine that with the normal fetch for actions/checkout to avoid running two git fetches.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

git fetch origin master takes 1.36s, so it doesn't seem worth optimizing to me.

actions/checkout does not currently support fetching multiple references. There's an open issue. actions/checkout#214

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 31, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants