-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix syntax on access of named variables
- Loading branch information
1 parent
accfc7e
commit 7f5a3bd
Showing
2 changed files
with
20 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,17 +13,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: olegtarasov/[email protected] | ||
id: tagName | ||
id: getTagNameParts | ||
with: | ||
tagRegex: (?<service>.*)\/v(?<version>.*) #example: backend/v1.2.3 | ||
tagRegexGroup: 0 | ||
|
||
- name: show-service | ||
env: | ||
ghRef: ${{ github.ref }} | ||
service: ${{ steps.tagName.outputs.service }} | ||
version: ${{ steps.tagName.outputs.version }} | ||
tagFromAction: ${{ steps.tagName.outputs.tag }} | ||
service: ${{ steps.getTagNameParts.outputs.service }} | ||
version: ${{ steps.getTagNameParts.outputs.version }} | ||
tagFromAction: ${{ steps.getTagNameParts.outputs.tag }} | ||
run: | | ||
echo "Ref: $ghRef" | ||
echo "Service: $service" | ||
|
@@ -36,10 +36,10 @@ jobs: | |
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
env: | ||
service: ${{ steps.tagName.outputs.service }} | ||
service: ${{ steps.getTagNameParts.outputs.service }} | ||
with: | ||
cache: 'maven' | ||
cache-dependency-path: '${{ service }}/pom.xml' | ||
cache-dependency-path: ${{ steps.getTagNameParts.outputs.service }}/pom.xml | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
|
@@ -57,25 +57,22 @@ jobs: | |
id: meta | ||
uses: docker/metadata-action@v5 | ||
env: | ||
service: ${{ steps.tagName.outputs.service }} | ||
image: ${{ env.REGISTRY }}/${{ github.repository }}-${{ service }} | ||
tagDefinitionMajorOnly: "type=match,pattern=(${{ service }})/v(\\d).\\d.\\d,group=2" | ||
tagDefinitionMajorMinor: "type=match,pattern=(${{ service }})/v(\\d.\\d).\\d,group=2" | ||
tagDefinitionFullVersion: "type=match,pattern=(${{ service }})/v(.*),group=2" | ||
image: ${{ env.REGISTRY }}/${{ github.repository }}-${{ steps.getTagNameParts.outputs.service }} | ||
tagDefinitionMajorOnly: type=match,pattern=(${{ steps.getTagNameParts.outputs.service }})/v(\d).\d.\d,group=2 | ||
tagDefinitionMajorMinor: type=match,pattern=(${{ steps.getTagNameParts.outputs.service }})/v(\d.\d).\d,group=2 | ||
tagDefinitionFullVersion: type=match,pattern=(${{ steps.getTagNameParts.outputs.service }})/v(.*),group=2 | ||
with: | ||
images: ${{ image }} | ||
tags: | | ||
${{ tagDefinitionMajorOnly }} | ||
${{ tagDefinitionMajorMinor }} | ||
${{ tagDefinitionFullVersion }} | ||
$tagDefinitionMajorOnly | ||
$tagDefinitionMajorMinor | ||
$tagDefinitionFullVersion | ||
type=raw,value=latest | ||
- name: Build and push image | ||
uses: docker/build-push-action@v5 | ||
env: | ||
service: ${{ steps.tagName.outputs.service }} | ||
with: | ||
context: ./${{ service }} | ||
context: ./${{ steps.getTagNameParts.outputs.service }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,17 +13,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: olegtarasov/[email protected] | ||
id: tagName | ||
id: getTagNameParts | ||
with: | ||
tagRegex: (?<service>.*)\/v(?<version>.*) #example: backend/v1.2.3 | ||
tagRegexGroup: 0 | ||
|
||
- name: show-service | ||
env: | ||
ghRef: ${{ github.ref }} | ||
service: ${{ steps.tagName.outputs.service }} | ||
version: ${{ steps.tagName.outputs.version }} | ||
tagFromAction: ${{ steps.tagName.outputs.tag }} | ||
service: ${{ steps.getTagNameParts.outputs.service }} | ||
version: ${{ steps.getTagNameParts.outputs.version }} | ||
tagFromAction: ${{ steps.getTagNameParts.outputs.tag }} | ||
run: | | ||
echo "Ref: $ghRef" | ||
echo "Service: $service" | ||
|
@@ -35,11 +35,9 @@ jobs: | |
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
env: | ||
service: ${{ steps.tagName.outputs.service }} | ||
with: | ||
cache: 'maven' | ||
cache-dependency-path: '${{ service }}/pom.xml' | ||
cache-dependency-path: '${{ steps.getTagNameParts.outputs.service }}/pom.xml' | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
|
@@ -48,12 +46,10 @@ jobs: | |
|
||
- name: Create GitHub Release | ||
id: create_release | ||
env: | ||
service: ${{ steps.tagName.outputs.service }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
${{ service }}/target/*.jar | ||
${{ steps.getTagNameParts.outputs.service }}/target/*.jar | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: false |