Skip to content

Commit

Permalink
support different configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Sep 23, 2024
1 parent 6edb29a commit 61f4cc5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
15 changes: 8 additions & 7 deletions maven/await-artifact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
[![test-maven-await-artifact](https://github.com/elastic/oblt-actions/actions/workflows/test-elastic-active-branches.yml/badge.svg?branch=main)](https://github.com/elastic/oblt-actions/actions/workflows/test-maven-await-artifact.yml)

<!--description-->
Waits for an artifact to be available on maven central
Waits for an artifact to be available on maven central or the sonatype proxy maven central.
<!--/description-->

NOTE: this action does not timeout, hence you need to configure your GitHub workflow accordingly.
See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes

## Inputs
<!--inputs-->
| Name | Description | Required | Default |
|--------------------------|-----------------------------------------------------------------------------------|----------|---------|
| `artifact-id` | Maven artifact-ID of the artifact | `true` | ` ` |
| `group-id` | Maven group-ID of the artifact | `true` | ` ` |
| `version` | Version of the artifact to wait for | `true` | ` ` |
| `wait-for-maven-central` | Whether to wait for the artifact to be available in the maven central repository. | `false` | `false` |
| Name | Description | Required | Default |
|-----------------------------|--------------------------------------------------------------------------------------|----------|---------|
| `artifact-id` | Maven artifact-ID of the artifact | `true` | ` ` |
| `group-id` | Maven group-ID of the artifact | `true` | ` ` |
| `version` | Version of the artifact to wait for | `true` | ` ` |
| `wait-for-sonatype-central` | Whether to wait for the artifact to be available in the sonatype central repository. | `false` | `true` |
| `wait-for-maven-central` | Whether to wait for the artifact to be available in the maven central repository. | `false` | `false` |
<!--/inputs-->


Expand Down
9 changes: 7 additions & 2 deletions maven/await-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: maven/await-artifact
description: |
Waits for an artifact to be available on maven central
Waits for an artifact to be available on maven central or the sonatype proxy maven central.
inputs:
artifact-id:
description: 'Maven artifact-ID of the artifact'
Expand All @@ -11,14 +11,19 @@ inputs:
version:
description: 'Version of the artifact to wait for'
required: true
wait-for-sonatype-central:
description: 'Whether to wait for the artifact to be available in the sonatype central repository.'
default: true
required: false
wait-for-maven-central:
description: 'Whether to wait for the artifact to be available in the maven central repository.'
default: false
required: false
runs:
using: "composite"
steps:
- name: Wait for artifact to be available on proxy maven central
- name: Wait for artifact to be available on proxy sonatype maven central
if: ${{ inputs.wait-for-sonatype-central == 'true' }}
shell: bash
run: |
TIME=30
Expand Down

0 comments on commit 61f4cc5

Please sign in to comment.