Skip to content

.github/workflows/tests.yml: Deploy Docker image#7219

Merged
sjackman merged 1 commit intoHomebrew:masterfrom
sjackman:docker-action
Mar 26, 2020
Merged

.github/workflows/tests.yml: Deploy Docker image#7219
sjackman merged 1 commit intoHomebrew:masterfrom
sjackman:docker-action

Conversation

@sjackman
Copy link
Copy Markdown
Contributor

Deploy the latest Docker image on a push to master.
Deploy a tagged Docker image upon publication of a release.

  • 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?

@sjackman sjackman self-assigned this Mar 25, 2020
@sjackman sjackman requested a review from MikeMcQuaid March 25, 2020 19:30
@sjackman sjackman force-pushed the docker-action branch 2 times, most recently from b3de9b7 to c0059f4 Compare March 25, 2020 21:11
@sjackman
Copy link
Copy Markdown
Contributor Author

GitHub Actions has failed with:

Error: No known CI provider detected! If you are using GitHub Actions or Jenkins
ghprb-plugin, then we cannot find the expected environment
variables! Check you have e.g. exported them to a Docker container.

https://github.com/Homebrew/brew/pull/7219/checks?check_run_id=534724942
That's unexpected. I don't believe that my PR could have caused this error.

@Bo98
Copy link
Copy Markdown
Member

Bo98 commented Mar 25, 2020

That always happens on the Linux runner.

The error appears to be:

Error response from daemon: No such image: brew_sut:latest

@jonchang
Copy link
Copy Markdown
Contributor

jonchang commented Mar 25, 2020

I would prefer that this be a scheduled event in Homebrew/brew rather than an on-push event in Homebrew/homebrew-core. I think core is too high-volume to do something like this. (Incidentally I think that formulae.brew.sh builds should also be scheduled in that repository, rather than as an on-push build).

Never mind, I'm blind and didn't see this was in Homebrew/brew and also was related to brew tagged releases. Doesn't Docker Hub already do this for us?

% docker run -it homebrew/brew:2.2.11
Unable to find image 'homebrew/brew:2.2.11' locally
2.2.11: Pulling from homebrew/brew
fe703b657a32: Already exists 
f9df1fafd224: Already exists 
a645a4b887f9: Already exists 
57db7fe0b522: Already exists 
531c6a124820: Pull complete 
2c382c3c5cfc: Pull complete 
39e593e4e69a: Pull complete 
41117761da13: Pull complete 
72e50d2cabbb: Pull complete 
Digest: sha256:c4d8d1acf4afb61b72e05c4abe415178a3a4aae185bf352e4f89db821aa5fa8c
Status: Downloaded newer image for homebrew/brew:2.2.11
root@006e5c606a40:/home/linuxbrew# 

Deploy the latest Docker image on a push to master.
Deploy a tagged Docker image upon publication of a release.
@sjackman sjackman requested a review from Bo98 March 26, 2020 01:53
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Seems fine but I was also under the impression Docker Hub did this for us?

@Bo98
Copy link
Copy Markdown
Member

Bo98 commented Mar 26, 2020

If I understand correctly, this is about GitHub Packages rather than Docker Hub.

@sjackman
Copy link
Copy Markdown
Contributor Author

Currently this PR is for GitHub Packages (GHP). My intention is to replace Docker Hub, to simplify and standardize on GitHub Actions.

@sjackman sjackman merged commit 0fd66ee into Homebrew:master Mar 26, 2020
@sjackman sjackman deleted the docker-action branch March 26, 2020 16:52
@dawidd6
Copy link
Copy Markdown
Contributor

dawidd6 commented Mar 26, 2020

Currently pulling images from Github Packages Registry requires authentication, so I don't think it's good for users yet.

@sjackman
Copy link
Copy Markdown
Contributor Author

Currently pulling images from Github Packages Registry requires authentication, so I don't think it's good for users yet.

I don't believe that's true. See https://github.com/Homebrew/brew/packages/29947

My plan is for GitHub Actions to push to both GitHub Packages Registry and Docker Hub. Once that's working, I'll disable Docker Hub Automated Build.

@dawidd6
Copy link
Copy Markdown
Contributor

dawidd6 commented Mar 26, 2020

@SMillerDev
Copy link
Copy Markdown
Member

running: docker pull docker.pkg.github.com/homebrew/brew/brew:2.2.11

Error response from daemon: Get https://docker.pkg.github.com/v2/homebrew/brew/brew/manifests/2.2.11: no basic auth credentials

@lock lock bot added the outdated PR was locked due to age label Apr 25, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants