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

build docker image and use it in action.yml #26

Closed
2 of 3 tasks
kirbyquerby opened this issue Jun 9, 2022 · 7 comments · Fixed by #37
Closed
2 of 3 tasks

build docker image and use it in action.yml #26

kirbyquerby opened this issue Jun 9, 2022 · 7 comments · Fixed by #37

Comments

@kirbyquerby
Copy link
Collaborator

kirbyquerby commented Jun 9, 2022

The action.yml currently still references the docker image made by securego/gosec:
https://github.com/informalsystems/gosec/blob/74c0f4d328d8723ac688fd1dee94e143695107fb/action.yml#L13

The release workflow also references publishing to the securego/securego docker image:
https://github.com/informalsystems/gosec/blob/74c0f4d328d8723ac688fd1dee94e143695107fb/.github/workflows/release.yml#L33

In general, a sweep should probably be done renaming securego where it makes sense:
https://github.com/search?q=securego+repo%3Ainformalsystems%2Fgosec&type=Code

For this issue, though, the following should be done to make a usable GitHub Action:

  • Choose a repository to store the docker image (we could use Docker Hub like how securego/gosec does or use an alternative like GitHub Packages or Google Container Registry )
  • Update the release workflow and action.yml to push to and reference the correct image
  • Create a release so that an image gets build
@odeke-em
Copy link
Collaborator

Thank you @kirbyquerby! @kirbyquerby could you please help me with instructions for how to accomplish this to edit the permissions to allow the Docker image publishing on ghcr, Github's Container Registry?

@odeke-em
Copy link
Collaborator

Turns out that I don't have admin access to make those modifications to this repository, so I shall kindly ping @ebuchman to run the steps that @kirbyquerby highlighted in #26 (comment)

@odeke-em
Copy link
Collaborator

@greg-szabo and team could you please help us out with enabling the modifications listed above in #26 (comment)?

@greg-szabo
Copy link
Member

Apologies for the late response here, I'm just back from leave.

The repo didn't really have an owner, so I made @odeke-em and @harveenSingh admin of the repo for now. This should take care of waiting on requests like this in the future.

It seems to me that you have to define a package first, before you can modify its properties. (I don't have any of the buttons described in the links either.) Try creating one using GitHub Actions first and then you should be able to change permissions on it.

Here's apalache's example of creating packages using GitHub Actions: https://github.com/informalsystems/apalache/blob/b627481fca3677b15457c704fdd6f8aab66b6d84/.github/workflows/container.yml (It's not perfect because it's compiling the dockerfile on the fly, but it's a good start.)

odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec.

Updates #26
odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec,
plus updates to the .github/workflows/*.yaml files.

Updates #26
odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec,
plus updates to the .github/workflows/*.yaml files.

Updates #26
odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec,
plus updates to the .github/workflows/*.yaml files.

Updates #26
odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec,
plus updates to the .github/workflows/*.yaml files.

Updates #26
odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec,
plus updates to the .github/workflows/*.yaml files.

Updates #26
odeke-em added a commit that referenced this issue Aug 5, 2022
A search and replace of securego/gosec to informalsystems/gosec,
plus updates to the .github/workflows/*.yaml files.

Updates #26
kirbyquerby added a commit to orijtech/gosec that referenced this issue Sep 2, 2022
I have intentionally avoided updating the action.yml. We can tidy everything up after get the image build and upload working :)

Updates cosmos#26
@odeke-em
Copy link
Collaborator

odeke-em commented Sep 6, 2022

Alright, thank you very much @kirbyquerby @marbar3778 @ebuchman, after https://github.com/cosmos/gosec/releases/tag/v0.0.3 we now have ghcr.io/cosmos/gosec:latest hence I shall close this issue. @kirbyquerby could you please help send a PR to the cosmos-sdk to include some passes?

@odeke-em odeke-em closed this as completed Sep 6, 2022
@kirbyquerby
Copy link
Collaborator Author

Not fixed. As specified in this issue, the action.yml still needs to be updated:

image: 'docker://securego/gosec'

kirbyquerby added a commit to orijtech/gosec that referenced this issue Sep 6, 2022
In addition to updating the action.yml to use this repository's image, I've also renamed/removed some (but not all) other references to securego.

Fixes cosmos#26
Updates cosmos#32
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 a pull request may close this issue.

3 participants