8000 Publish docker images on Github Container Registry by InvisibleRain · Pull Request #1425 · v2rayA/v2rayA · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Publish docker images on Github Container Registry #1425

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

Merged
merged 19 commits into from
Jun 17, 2024

Conversation

InvisibleRain
Copy link
Contributor

This pull request aims to publish the docker images of v2rayA on ghcr.io in addition to already existing images on Docker Hub. The images are built and published using GitHub Actions every time a new v2rayA version is tagged. After the "Build & Release v2rayA" workflow completes, these images will be available under the "Packages" section of the repository. After the workflow has completed, you can use this command to download the image: docker pull ghcr.io/v2raya/v2raya:latest

Copy link
Collaborator
@mzz2017 mzz2017 left a comment

Choose a reason for hiding this comment

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

LGTM.

@mzz2017 mzz2017 merged commit 1c486b4 into v2rayA:main Jun 17, 2024
43 checks passed
@MarksonHon
Copy link
Contributor
MarksonHon commented Jun 18, 2024

@InvisibleRain GitHub CI actually uses the docker files in the install/docker directory, however your pull request does not modify them. Is the new Label option necessary for uploading Docker images to the GitHub Container Registry?

@InvisibleRain
Copy link
Contributor Author

@MarksonHon The label is not strictly required for the GitHub Actions, but it's useful when pushing a manually built image from a personal computer.

See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#pushing-container-images

When you push a container image from the command line, the image is not linked to a repository by default. This is the case even if you tag the image with a namespace that matches the name of the repository, such as ghcr.io/octocat/my-repo:latest.

The easiest way to connect a repository to a container package is to publish the package from a workflow using ${{secrets.GITHUB_TOKEN}}, as the repository that contains the workflow is linked automatically. Note that the GITHUB_TOKEN will not have permission to push the package if you have previously pushed a package to the same namespace, but have not connected the package to the repository.

To connect a repository when publishing an image from the command line, and to ensure your GITHUB_TOKEN has appropriate permissions when using a GitHub Actions workflow, we recommend adding the label org.opencontainers.image.source to your Dockerfile. For more information, see “Labelling container images” in this article and “Publishing and installing a package with GitHub Actions.”

@InvisibleRain
Copy link
Contributor Author

The images are currently marked as private. I think it might be a good idea to change visibility in "Package settings"

@MarksonHon
Copy link
Contributor

@InvisibleRain Done

MarksonHon pushed a commit to MarksonHon/v2rayA that referenced this pull request Jun 19, 2024
ci: add version number to filename

ci: windows version should be win10 at least

chore(docker): Publish docker images on Github Container Registry (v2rayA#1425)

* Temporary test

* Push containers to ghcr.io via GitHub Actions

* replace tabs with spaces

* temporary comment out dockerhub

* temporary comment out dockerhub for gui

* revertme: remove non-ghcr docker image tags

* convert repo owner name to lowercase

* fix conversion to lowercase

* fix typo, move lowercase conversion to calculate sooner

* copy lowercase conversion to both jobs

* fix typo

* add labels to gui and dev Dockerfiles

* specify correct push path for the ghcr.io

* fix typo

* hardcode image name

* specify correct labels for upstream

* add dockerhub tags

* uncomment dockerhub login

* restore Dockerfile.dev
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.

3 participants
0