Added readme and icon

This commit is contained in:
acomo 2021-02-20 23:14:13 +01:00
parent 761853bf28
commit 739e5d447f
2 changed files with 64 additions and 0 deletions

61
README.md Normal file
View 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
```

View File

@ -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'