mirror of
https://github.com/andreacomo/maven-gav-extractor.git
synced 2026-02-04 08:45:52 +08:00
739e5d447f2feda2df9c7d89aa03f73919f554f2
Maven GAV (groupId, artifactId, version) Extractor GitHub Action
This action extracts from pom.xml GAV info, i.e.:
groupIdartifactIdversion
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
Description
Github Action for extracting groupId, artifactId and version (GAV) from pom.xml
https://github.com/marketplace/actions/maven-gav-extractor