YouTube-operational-API icon indicating copy to clipboard operation
YouTube-operational-API copied to clipboard

Added Docker CI/CD

Open Andromeda606 opened this issue 3 months ago • 21 comments

  • Added CI/CD to create Docker image and updated README
  • I also optimized the project's Docker images. This optimization reduced the compressed package size by 42 MB.

Before -> After

What to do

First, you need to generate a secret key. You can generate tokens using the repository owner's username via this link:

https://app.docker.com/accounts/benjaminloison/settings/personal-access-tokens

Then click on the link:

https://github.com/Benjamin-Loison/YouTube-operational-API/settings/secrets/actions

and create the DOCKER_USERNAME and DOCKER_TOKEN parameters. Then confirm this MR.

From this point on, the main branch is assumed to be the stable branch. We may want to change this.

Related to #336

Andromeda606 avatar Aug 25 '25 18:08 Andromeda606

I think I reverted the readme commit, so I pushed it again.

Andromeda606 avatar Aug 25 '25 18:08 Andromeda606

Note that I have not yet check changes line by line, but just got the big picture, I am waiting you to answer #338#issuecomment-3221623630, to continue investigating your proposal.

Benjamin-Loison avatar Aug 25 '25 20:08 Benjamin-Loison

This code is currently docker versioning with the commit hash value (short hash)

So right now, the repo is working the same way

Andromeda606 avatar Aug 25 '25 22:08 Andromeda606

Sorry for being picky. Please consider my comments, then I will verify experimentally that Dockerfile still works as wanted. Finally I will try the CI/CD.

Benjamin-Loison avatar Aug 25 '25 23:08 Benjamin-Loison

I'll update the code after comments are answered.

Andromeda606 avatar Aug 26 '25 07:08 Andromeda606

I treated your answers, let me know if I forgot one.

Benjamin-Loison avatar Aug 26 '25 11:08 Benjamin-Loison

Are there any expected developments?

Andromeda606 avatar Aug 29 '25 11:08 Andromeda606

I will consider your comment files#r2306463965.

Benjamin-Loison avatar Aug 29 '25 11:08 Benjamin-Loison

The .git folder will no longer appear during build. I also updated the version control

Andromeda606 avatar Aug 29 '25 11:08 Andromeda606

Sorry I was quite busy these last days, let me check what I wanted to provide feedback for.

Benjamin-Loison avatar Aug 30 '25 16:08 Benjamin-Loison

Can you rebase your branch? Well this should be unnecessary as I plan to Merge pull request > Squash and merge.

Benjamin-Loison avatar Aug 30 '25 18:08 Benjamin-Loison

Personal note:

The Stack Overflow answer 5038977 helps figuring out the differences of this pull request.

git diff HEAD~7 --stat
Output:
 .dockerignore                        |  2 ++
 .github/workflows/docker-publish.yml | 39 +++++++++++++++++++++++++++++++++++++++
 .gitignore                           |  2 +-
 Dockerfile                           | 27 ++++++++++++++-------------
 README.md                            | 21 +++++----------------
 index.php                            | 15 ++++++++++-----
 6 files changed, 71 insertions(+), 35 deletions(-)

Benjamin-Loison avatar Aug 30 '25 18:08 Benjamin-Loison

I updated the code. Are there any expected developments?

Andromeda606 avatar Aug 30 '25 20:08 Andromeda606

I am fine still adding Docker Hub support, but it seems less urgent to me, I am busy these days, I plan a priori to reconsider this pull request by Thursday evening.

Benjamin-Loison avatar Aug 31 '25 20:08 Benjamin-Loison

Is there anything I should do?

Andromeda606 avatar Sep 09 '25 10:09 Andromeda606

I'll check again your pull request on 11/09/25 evening Paris time or later.

Benjamin-Loison avatar Sep 09 '25 21:09 Benjamin-Loison

Is there anything I should do? I need this PR

Andromeda606 avatar Sep 12 '25 14:09 Andromeda606

Personal note:

DuckDuckGo and Google search GitHub pull request diff.

The Stack Overflow answer 6188624 helps.

Benjamin_Loison/git/issues/110 would help.

DuckDuckGo search GitHub checkout pull request.

The Stack Overflow answer 30584951:

git fetch origin pull/337/head:337
Output:
remote: Enumerating objects: 39, done.
remote: Counting objects: 100% (39/39), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 34 (delta 17), reused 24 (delta 8), pack-reused 0 (from 0)
Unpacking objects: 100% (34/34), 3.80 KiB | 555.00 KiB/s, done.
From github.com:Benjamin-Loison/YouTube-operational-API
 * [new ref]         refs/pull/337/head -> 337
git branch 
Output:
  337
* main
git checkout 337
Switched to branch '337'

Benjamin-Loison avatar Sep 20 '25 19:09 Benjamin-Loison

Is there anything I should do? I need this PR. Again.

Andromeda606 avatar Oct 08 '25 10:10 Andromeda606

I am waiting your answer to pull/337/files#r2365855199.

Benjamin-Loison avatar Oct 08 '25 10:10 Benjamin-Loison