Commit Graph

40 Commits

Author SHA1 Message Date
Brendon Smith 580d9d0a03
Make `workflow_dispatch` Docker tag input required
https://github.com/pypa/gh-action-pypi-publish/pull/230#discussion_r1759496153
2024-09-14 14:05:40 -04:00
Brendon Smith fa8a0e8234
Make smoke test job depend on build job
https://github.com/pypa/gh-action-pypi-publish/pull/230#discussion_r1759486988

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-09-14 14:04:11 -04:00
Brendon Smith 314a4119af
Move smoke test to reusable workflow 2024-09-08 13:23:30 -04:00
Brendon Smith 5521a4f2d7
Add Docker tags for major and minor versions 2024-09-07 14:28:31 -04:00
Brendon Smith 1ce7f9dd93
Verify fail-fast in unsupported environments 2024-09-07 13:19:32 -04:00
Brendon Smith 90ff14245c
Reset smoke test path 2024-09-07 13:17:38 -04:00
Brendon Smith 59e3edf69a
Don't update `actions/checkout@v3` 2024-09-07 13:17:38 -04:00
Brendon Smith 9337018ef6
Add `workflow_dispatch` trigger for Docker builds 2024-09-07 13:17:38 -04:00
Brendon Smith b17295d929
Use YAML block strip syntax (`>-`) where possible 2024-09-07 13:17:38 -04:00
Brendon Smith a6e32908e1
Generate Docker container action with Python 2024-09-07 13:17:35 -04:00
Brendon Smith 6364a07eb7
Separate `docker login` and `docker push`
https://github.com/pypa/gh-action-pypi-publish/pull/230#discussion_r1578694138
2024-09-07 13:13:36 -04:00
Brendon Smith 1e0ccc9165
Fix pre-commit errors 2024-09-07 13:13:36 -04:00
Brendon Smith eb50ad49cf
Build Docker image and push to GHCR
Up to this point, the project has been set up as a Docker action
referencing the Dockerfile. The downside to using the Dockerfile for the
action is that the Docker image must be built every time the action is
used.

This commit will set up the project to build the Docker image and push
it to GitHub Container Registry (GHCR). This change will speed up user
workflows every time the action is used because the workflows will
simply pull the Docker image from GHCR instead of building again.

Changes:

- Add required metadata to Dockerfile
- Build container image with GitHub Actions
- Push container image to GHCR

Docker actions support pulling in pre-built Docker images. The downside
is that there's no way to specify the correct Docker tag because the
GitHub Actions `image` and `uses:` keys don't accept any context.
For example, if a user's workflow has
`uses: pypa/gh-action-pypi-publish@release/v1.8`, then the action should
pull in a Docker image built from the `release/v1.8` branch, something
like `ghcr.io/pypa/gh-action-pypi-publish:release-v1.8` (Docker tags
can't have `/`). The workaround is to switch the top-level `action.yml`
to a composite action that then calls the Docker action, substituting
the correct image name and tag.
2024-09-07 13:13:32 -04:00
Sviatoslav Sydorenko a712d989cc
Make the vulnerability report URL direct 2023-09-11 16:40:56 +02:00
Sviatoslav Sydorenko bbf06d8ae3
Migrate security doc from RST to Markdown
RST files are no longer correctly recognized by GitHub.
2023-09-11 16:38:50 +02:00
Sviatoslav Sydorenko f131721e84
🎨 Convert action inputs to use kebab-case
Up until now, the action input names followed the snake_case naming
pattern that is well familiar to the pythonistas. But in GitHub
actions, the de-facto standard is using kebab-case, which is what
this patch achieves.
This style helps make the keys in YAML better standardized and
distinguishable from other identifiers.
The old snake_case names remain functional for the time being and will
not be removed until at least v3 release of this action.
2023-03-11 01:24:52 +01:00
Sviatoslav Sydorenko 644926c972
🧪 Always run smoke testing in debug mode 2022-12-07 02:34:31 +01:00
Sviatoslav Sydorenko 57e7d53102
🐛Ensure the default `$PATH` value is pre-loaded
This patch imports the system-global profile script to
populate the `$PATH` variable with the typically available binary
paths.

Ref:
https://github.com/pypa/gh-action-pypi-publish/issues/112#issuecomment-1340065840
2022-12-06 23:58:05 +01:00
Sviatoslav Sydorenko 102d8ab13f
🐛 Rehardcode devpi port for GHA srv container 2022-12-06 23:18:25 +01:00
Sviatoslav Sydorenko 3a9eaef3ef
🐛Use different ports in/out of GHA containers 2022-12-06 23:13:58 +01:00
Sviatoslav Sydorenko a01fa7442e
🐛 Use `localhost` @ GHA outside the containers 2022-12-06 23:04:43 +01:00
Sviatoslav Sydorenko ee892fd7f2
🐛Move Twine repository URL definitions to steps 2022-12-06 23:01:39 +01:00
Sviatoslav Sydorenko 967acbb201
🎨Reuse existing requirement pins @ smoke-test 2022-12-06 22:30:01 +01:00
Sviatoslav Sydorenko 5755482491
Stop upgrading pip @ GHA unnecessarily 2022-12-06 22:27:07 +01:00
Sviatoslav Sydorenko dfc70e7dc8
Make the stub package dir creation verbose @ GHA 2022-12-06 22:26:35 +01:00
Sviatoslav Sydorenko 1c4183fd91
🎨 Make the GHA steps named 2022-12-06 22:26:08 +01:00
Sviatoslav Sydorenko efa83bf521
Pin `setuptools` for pkg stub to v65.6.3
This patch is meant to improve the reproducibility of smoke-testing.
2022-12-06 22:20:59 +01:00
Sviatoslav Sydorenko 3f27ae2c90
Drop unnecessary `wheel` declaration from stub pkg 2022-12-06 22:18:59 +01:00
Sviatoslav Sydorenko ee83abeb35
🎨 Put devpi creds into reusable vars @ GHA 2022-12-06 22:17:42 +01:00
Sviatoslav Sydorenko 08af49986e
🎭 Enable output ANSI-colorization in CI 2022-12-06 22:08:08 +01:00
Sviatoslav Sydorenko 713d81cca0
Update the test job ID to `smoke-test` 2022-12-06 22:06:28 +01:00
Sviatoslav Sydorenko 3a5c774287
Update the workflow name to 🧪 2022-12-06 22:06:05 +01:00
Sviatoslav Sydorenko 819df810af
Rename the GHA workflow to self-smoke-test-action 2022-12-06 22:02:49 +01:00
Sviatoslav Sydorenko b3f93a1ad6
Expect the GHA workflow to complete in 2 minutes 2022-12-06 00:16:34 +01:00
Sviatoslav Sydorenko cde4774fb1
Adjust the GHA workflow per yamllint rules 2022-12-06 00:11:43 +01:00
Sviatoslav Sydorenko a737e68aed
Sync funding config with other places I maintain 2022-12-06 00:08:31 +01:00
Sviatoslav Sydorenko 7ef975b955
Run CI smoke-tests in PRs 2022-12-05 23:33:07 +01:00
S2 9022aae148
Add test upload workflow 2022-12-06 09:01:24 +11:00
Sviatoslav Sydorenko 470267472e
Add SECURITY text 2019-05-26 17:50:09 +02:00
Sviatoslav Sydorenko b6c2b2a4d0
Add a FUNDING config file 2019-05-26 17:07:58 +02:00