mirror of
https://github.com/andreacomo/maven-gav-extractor.git
synced 2025-06-08 04:27:56 +08:00
Compare commits
No commits in common. "main" and "v2.0.0" have entirely different histories.
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Should extract GAV
|
name: Should extract GAV
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Extract GAV
|
- name: Extract GAV
|
||||||
id: extract
|
id: extract
|
||||||
uses: ./
|
uses: ./
|
||||||
|
12
README.md
12
README.md
@ -11,11 +11,6 @@ This *GitHub Action* extracts GAV from `pom.xml`, i.e.:
|
|||||||
|
|
||||||
Why should I need this? For example, to **name** and **tag** a Docker image built upon your artifact or **pass as parameters** to a dispatched workflow.
|
Why should I need this? For example, to **name** and **tag** a Docker image built upon your artifact or **pass as parameters** to a dispatched workflow.
|
||||||
|
|
||||||
## Versioning
|
|
||||||
This project follows *Semantic Versioning* according to [GitHub Actions versioning practice](https://github.com/actions/toolkit/blob/main/docs/action-versioning.md)
|
|
||||||
|
|
||||||
>Current stable version is `v2`
|
|
||||||
|
|
||||||
## Prerequirements
|
## Prerequirements
|
||||||
|
|
||||||
This action expects you to have `maven` available in your workflow environment
|
This action expects you to have `maven` available in your workflow environment
|
||||||
@ -47,15 +42,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Should extract GAV
|
name: Should extract GAV
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
distribution: temurin
|
|
||||||
- name: Extract GAV
|
- name: Extract GAV
|
||||||
id: extract
|
id: extract
|
||||||
uses: andreacomo/maven-gav-extractor@v2
|
uses: andreacomo/maven-gav-extractor@v1
|
||||||
- name: Log GAV
|
- name: Log GAV
|
||||||
run: |
|
run: |
|
||||||
echo ${{ steps.extract.outputs.group-id }}
|
echo ${{ steps.extract.outputs.group-id }}
|
||||||
|
@ -30,14 +30,14 @@ runs:
|
|||||||
EVALUATE: org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate
|
EVALUATE: org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate
|
||||||
run: |
|
run: |
|
||||||
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.groupId -q -DforceStdout)
|
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.groupId -q -DforceStdout)
|
||||||
echo "group-id=$VALUE" >> $GITHUB_OUTPUT
|
echo "::set-output name=group-id::$VALUE"
|
||||||
|
|
||||||
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.artifactId -q -DforceStdout)
|
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.artifactId -q -DforceStdout)
|
||||||
echo "artifact-id=$VALUE" >> $GITHUB_OUTPUT
|
echo "::set-output name=artifact-id::$VALUE"
|
||||||
|
|
||||||
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.version -q -DforceStdout)
|
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.version -q -DforceStdout)
|
||||||
echo "version=$VALUE" >> $GITHUB_OUTPUT
|
echo "::set-output name=version::$VALUE"
|
||||||
|
|
||||||
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.name -q -DforceStdout)
|
VALUE=$(mvn -f ${{ inputs.pom-location }} $EVALUATE -Dexpression=project.name -q -DforceStdout)
|
||||||
echo "name=$VALUE" >> $GITHUB_OUTPUT
|
echo "::set-output name=name::$VALUE"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user