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 build on PR via GitHub actions #793

Merged
merged 5 commits into from
May 18, 2020

Conversation

VonOx
Copy link
Contributor

@VonOx VonOx commented May 14, 2020

This resolve #626 by providing docker build on PR by using Github Actions

After successful build, PR is commented with docker command to test the image

You need to set Github Secrets in the repo for pushing image to dockerhub:

  • DOCKER_PASSWORD
  • DOCKER_USER

Configured for dockerhub repo named gladys-dev

@VonOx VonOx changed the title Dev - Docker build on PR via GitHub actions Docker build on PR via GitHub actions May 14, 2020
@VonOx VonOx requested a review from Pierre-Gilles May 14, 2020 13:33
@Pierre-Gilles
Copy link
Contributor

Wow! Really nice! 👏

@VonOx
Copy link
Contributor Author

VonOx commented May 18, 2020

I've made modification related to OZW build.
This can now be merged

@Pierre-Gilles Pierre-Gilles merged commit eab4061 into GladysAssistant:master May 18, 2020
@Pierre-Gilles
Copy link
Contributor

Thanks for this great PR ! First PR building here:

https://github.com/GladysAssistant/Gladys/pull/808/checks?check_run_id=685353843

@Pierre-Gilles
Copy link
Contributor

Mmm seems the login failed

Screenshot 2020-05-18 at 15 11 25

yes, I did put the secrets:

Screenshot 2020-05-18 at 15 12 43

Did this work on your repo?

@VonOx
Copy link
Contributor Author

VonOx commented May 18, 2020

Yeah its working fine on my repo https://github.com/VonOx/Gladys4_GithubActions

EDIT: I think secrets must be at repo level not organization.
Or maybe access policy behavior ?
https://github.blog/changelog/2020-05-14-organization-secrets/

@Pierre-Gilles
Copy link
Contributor

It's supposed to be ok, I put only the Gladys repo:

Screenshot 2020-05-18 at 17 16 46

I started another PR to see if it works =>

https://github.com/GladysAssistant/Gladys/pull/783/checks?check_run_id=685812996

@Pierre-Gilles
Copy link
Contributor

One question: how is it different from CircleCI? Are secret shared with third-party pull request?

How is it safer that what we couldn't do with CircleCI?

@Pierre-Gilles
Copy link
Contributor

From what I found, it seems it's not possible to use secrets in Github Actions from PR =>

https://gh.neting.ccmunity/t5/GitHub-Actions/Make-secrets-available-to-builds-of-forks/td-p/30678

So this doesn't work

@Pierre-Gilles
Copy link
Contributor

Sadly it's broken on your repo as well :/

https://github.com/VonOx/Gladys4_GithubActions/pull/16

@Pierre-Gilles
Copy link
Contributor

Screenshot 2020-05-18 at 17 40 54

@VonOx
Copy link
Contributor Author

VonOx commented May 18, 2020

F**k! I've made several PR to test, but forking his own repo is not possible.

@VonOx
Copy link
Contributor Author

VonOx commented May 18, 2020

Back to square one !

Github Actions and CircleCI have the same behavior on Fork . The risk is important for any CI system.

I've no solution for now 😞

@Pierre-Gilles
Copy link
Contributor

ok ! I'll remove the Github actions on master then

NickDub-old pushed a commit to NickDub/Gladys that referenced this pull request Aug 7, 2020
* Create Dockerfile.buildx

* Create pr-docker-image.yml

* Move yaml in the correct folder

* OZW 1.6 use the same version in all context 

Based on GladysAssistant#675

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
@VonOx VonOx deleted the github-actions branch October 21, 2020 14:55
R6n0 pushed a commit to R6n0/Gladys that referenced this pull request Dec 2, 2020
* Create Dockerfile.buildx

* Create pr-docker-image.yml

* Move yaml in the correct folder

* OZW 1.6 use the same version in all context 

Based on GladysAssistant#675

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate service image for testing
2 participants