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

feat(gha): add docker push github action #1116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

georgettica
Copy link

fixes #427

@georgettica
Copy link
Author

this is not tested fully, but I am hopeful this just works.

@georgettica
Copy link
Author

@epage , this is my "throw this and check if it sticks"

I added the manual trigger if you want to play with it manually, before pushing to continuus-deployment

if you want me to integrate with other github actions I can spend time on this too

@epage
Copy link
Collaborator

epage commented Oct 8, 2024

As this is a completely new workflow to me, posting an Action is insufficient. I specifically asked for documentation. I need to understand the workflow and the requirements it places on me.


steps:
- name: Checkout code
uses: actions/checkout@v4
Copy link

Choose a reason for hiding this comment

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

Maybe only fetch 1 depth is sufficient.

Copy link
Author

Choose a reason for hiding this comment

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

did not find a way to change it to the way you want. I saw the default fetch-depth is 1

Comment on lines +42 to +47
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.get_tag.outputs.tag }}
Copy link

Choose a reason for hiding this comment

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

We also need to build multi-architecture images alongside the CLI release

Copy link
Author

Choose a reason for hiding this comment

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

ill do it along the weekend 🍾

Copy link
Author

Choose a reason for hiding this comment

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

my weekend was not very useful, so found time to push this now

@georgettica
Copy link
Author

oh sorry @epage , I will create the documentation on how this workflow works in addition to the changes requested in the review

@georgettica
Copy link
Author

georgettica commented Oct 14, 2024

@weijiany care to check on your machine?

docker build --tag typos --platform "linux/arm64/v8,linux/amd64" .

( I use podman so I just replaced it with docker hoping it just works )

Dockerfile Show resolved Hide resolved
@georgettica
Copy link
Author

It is worth noting ChatGPT is a good friend of mine, so he is a co-author.

I hope this is ok by you ❤️

@weijiany
Copy link

@weijiany care to check on your machine?

docker build --tag typos --platform "linux/arm64/v8,linux/amd64,linux/amd64" .

( I use podman to I just replaced it with docker hoping it just works )

Hi @georgettica, it works well. ✅

BTW, I am not the repository's maintainer; I am simply a user who wishes to directly utilize the image.

tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.get_tag.outputs.tag }}
# platforms: linux/arm64/v8,darwin/amd64,linux/amd64,windows/amd64,linux/amd64 # was what I was aiming for
# but locally I only got to these 3 (specifically linux/arm64/v8 but yeah)
platforms: linux/arm64,linux/amd64

Choose a reason for hiding this comment

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

TBH, I didn't work with on Github action to build multi-arch. But in some pipeline tool that I have used, a question is needn't we to install qemu before building image?’

Copy link
Author

Choose a reason for hiding this comment

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

That makes sense. I can add it, but I am adding the required tools inside the docker, so I hope it "just works".

@georgettica
Copy link
Author

PS, I accidentally had one of the tools twice: linux/amd64,linux/amd64 but it isn't a real issue

@georgettica
Copy link
Author

@weijiany, I guess the only other thing I want to ask so we can move this PR forward is your thoughts and opinions on the documentation I cobbled up.

@weijiany
Copy link

@weijiany, I guess the only other thing I want to ask so we can move this PR forward is your thoughts and opinions on the documentation I cobbled up.

For me, the doc is quite clear, possibly because I've reviewed your changes by going through the GitHub Actions documentation. 😅

@georgettica
Copy link
Author

Well, at least it's clear. I hope it'll be ok once the actual review comes around

@georgettica
Copy link
Author

@epage, can I get 👀 ? (sorry for pinging, I don't want this PR to go to waste)

@epage
Copy link
Collaborator

epage commented Oct 21, 2024

You are in my queue of prs and issues to get to.

Be sure the commits are all atomic and organized for how you want me to review and merge this.

@georgettica georgettica force-pushed the georgettica/feat/gha/add-docker-push-github-action branch from 66b3007 to 91f9eb2 Compare October 22, 2024 16:24
@georgettica georgettica force-pushed the georgettica/feat/gha/add-docker-push-github-action branch from 91f9eb2 to 0a1a113 Compare October 22, 2024 16:28
@georgettica
Copy link
Author

I made them into one big blob, as they weren't atomic and some were patch fixes.

I am ok with all the PR not passing as it's one atomic change.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11464483713

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 22.789%

Totals Coverage Status
Change from base Build 11432065555: 0.0%
Covered Lines: 536
Relevant Lines: 2352

💛 - Coveralls

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.

Not available dockerhub/external repo for dockerfile
4 participants