mirror of
https://github.com/andreacomo/maven-gav-extractor.git
synced 2025-06-03 09:17:56 +08:00
Added readme and icon
This commit is contained in:
parent
761853bf28
commit
739e5d447f
61
README.md
Normal file
61
README.md
Normal file
@ -0,0 +1,61 @@
|
||||
# Maven GAV (groupId, artifactId, version) Extractor *GitHub Action*
|
||||
|
||||
This action extracts from `pom.xml` GAV info, i.e.:
|
||||
|
||||
* `groupId`
|
||||
* `artifactId`
|
||||
* `version`
|
||||
|
||||
Why should I need this? For example, to **name** and **tag** a Docker image built upon your artifact
|
||||
|
||||
## Prerequirements
|
||||
|
||||
This action expects you to have `maven` available in your workflow environment
|
||||
|
||||
## Inputs
|
||||
|
||||
### `pom-location`
|
||||
|
||||
**Required** Full path to your project `pom.xml` file. Default value is POM in your project root: `${{ github.workspace }}/pom.xml`
|
||||
|
||||
## Outputs
|
||||
|
||||
### `group-id`
|
||||
|
||||
Group Id of your project
|
||||
|
||||
### `artifact-id`
|
||||
|
||||
Artifact Id of your project
|
||||
|
||||
### `version`
|
||||
|
||||
Version of your project
|
||||
|
||||
## Example usage
|
||||
|
||||
```
|
||||
name: Sample workflow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Should extract GAV
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Extract GAV
|
||||
id: extract
|
||||
uses: andreacomo/maven-gav-extractor-github-action@v1
|
||||
- name: Log GAV
|
||||
run: |
|
||||
echo ${{ steps.extract.outputs.group-id }}
|
||||
echo ${{ steps.extract.outputs.artifact-id }}
|
||||
echo ${{ steps.extract.outputs.version }}
|
||||
shell: bash
|
||||
```
|
@ -1,5 +1,8 @@
|
||||
name: 'Maven GAV Extractor'
|
||||
description: 'Extract Maven grouoId, artifactId and version from pom.xml'
|
||||
branding:
|
||||
icon: 'bar-chart-2'
|
||||
color: 'orange'
|
||||
inputs:
|
||||
pom-location:
|
||||
description: 'Full path to pom.xml file'
|
||||
|
Loading…
x
Reference in New Issue
Block a user