Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jvalkeal/nexus-sync
https://github.com/jvalkeal/nexus-sync
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jvalkeal/nexus-sync
- Owner: jvalkeal
- License: mit
- Created: 2021-02-06T14:21:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T11:06:42.000Z (over 1 year ago)
- Last Synced: 2024-10-05T20:06:50.884Z (about 1 month ago)
- Language: TypeScript
- Size: 965 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nexus Sync Action
**NOTE:** Work in progress to overcome bintray sunset
### Arguments
| Input | Description | Usage |
| --------------------------- | ---------------------------------------------------------------------------------------------------| -------- |
| `username` | Nexus username | Required |
| `password` | Nexus password | Required |
| `staging-profile-name` | Nexus Staging Profile Name | Required |
| `dir` | Base directory for files to sync, defaults to "nexus" | Optional |
| `create` | Automatically create repository, defaults to "false" | Optional |
| `staging-repo-id` | Nexus Staging Repo id | Optional |
| `close` | Automatically close repository, defaults to "false". | Optional |
| `drop-if-failure` | Automatically drop repository, defaults to "false". | Optional |
| `close-timeout` | How long in seconds to wait slow nexus close operation, defaults to "600" | Optional |
| `release` | Automatically release repository, defaults to "false". | Optional |
| `release-auto-drop` | Drop repo after release, defaults to "true". | Optional |
| `release-timeout` | How long in seconds to wait slow nexus release operation, defaults to "600" | Optional |
| `generate-checksums` | Generate checksums, defaults to "false" | Optional |
| `generate-checksums-config` | Config to generate checksum files. | Optional |
| `pgp-sign` | Sign files, defaults to "false" | Optional |
| `pgp-sign-private-key` | PGP private key as ascii armored | Optional |
| `pgp-sign-passphrase` | PGP private key passphrase | Optional |
| `url` | Base Nexus url, defaults to "https://oss.sonatype.org" | Optional |
| `upload` | Upload files, defaults to "false". | Optional |
| `upload-parallel` | How many files are uploaded parallel, defaults to "1" | Optional |
| `nexus-timeout` | How long in seconds to wait http requests to nexus, defaults to "0" meaning no timeout | Optional |# Usage
See [action.yml](action.yml)
On default this action really does nothing unless needed configs are
in place.This normal example of an action does:
- Takes everything under base directory _nexus_
- PGP sign files
- Create _md5_ and _sha_ checksums
- Creates a stating repo
- Uploads everything under _nexus_ into newly create stating repo
- Closes it and wait closed state
- Releases it and wait a proper state
- After all this, you should have artifacts released```yaml
name: Sync
on:
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
- uses: jvalkeal/nexus-sync@main
with:
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}
staging-profile-name: test
create: true
upload: true
close: true
release: true
generate-checksums: true
pgp-sign: true
pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
```There are more detailed docs and samples under [docs](docs) directory.
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)