polkadot-developers / substrate-docs

Substrate Developer Hub. Substrate is powered by best in class cryptographic research and comes with peer to peer networking, consensus mechanisms, and much more.
https://docs.substrate.io
BSD Zero Clause License
130 stars 274 forks source link

GitHub action publishes the Docker image whenever a PR is open #1051

Open tomaka opened 2 years ago

tomaka commented 2 years ago

The GitHub Action "build-website-image" publishes the Docker image whenever a PR is open. In other words, as soon as someone opens a PR, the changes proposed by the PR are immediately published on Docker Hub, even before the PR is merged.

I suppose that this is not intended because this feels extremely wrong to me, but feel free to close this issue if it is in fact intended.

TriplEight commented 2 years ago

The pipeline design indeed seems not optimal, however https://hub.docker.com/u/paritytechno (cc https://github.com/substrate-developer-hub/substrate-docs/issues/415) is not a repository we call "official".

We (CI and Infra teams) control the following registries. Please take a look at the Intro part and the PS there.

Having that said, https://hub.docker.com/u/paritytechno is not something (to my knowledge) is published elsewhere for people to use in the wild (but it's a shame we don't have credentials for it). Thus, it's not a big deal to have it published from a PR, esp knowing that GitHub will fail running this action from an external developer's pipeline as there's no way to allow them using secrets.

Returning to a pipeline design, I would rather suggest building the website and hosting it locally for a further link check than actually publishing it.