-
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.
Merge pull request #4 from MathieuSoysal/3-add-selector-on-tags
3 add selector on tags
- Loading branch information
Showing
4 changed files
with
82 additions
and
4 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 |
---|---|---|
|
@@ -18,8 +18,13 @@ jobs: | |
command_line: cat tests/test2.txt | ||
contains: MathieuSoysal/[email protected] | ||
|
||
- uses: GuillaumeFalourd/assert-command-line-output@v2 | ||
with: | ||
command_line: cat tests/test-maven.txt | ||
contains: cloud.tools:jib-maven-plugin:3.2.1 | ||
|
||
test-for-github-workflow: # Test the action with the GitHub workflow | ||
name: Test update-readme-files action | ||
name: Test update dependency | ||
needs: check-files | ||
continue-on-error: true | ||
strategy: | ||
|
@@ -47,3 +52,24 @@ jobs: | |
with: | ||
command_line: cat tests/test2.txt | ||
contains: MathieuSoysal/[email protected] | ||
|
||
|
||
|
||
# Test with a specific kind tag | ||
|
||
- name: Test kind of tag | ||
uses: ./ | ||
with: | ||
files: tests/test-maven.txt | ||
github_repository: GoogleContainerTools/jib | ||
prefix: "cloud.tools:jib-maven-plugin:" | ||
suffix: ":build ." | ||
regex: "[0-9.]*" | ||
selector: maven | ||
|
||
- name: Test if file has been updated | ||
uses: GuillaumeFalourd/assert-command-line-output@v2 | ||
with: | ||
command_line: cat tests/test-maven.txt | ||
contains: cloud.tools:jib-maven-plugin:3.2.1 | ||
expected_result: FAILED |
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 |
---|---|---|
|
@@ -18,8 +18,13 @@ jobs: | |
command_line: cat tests/test2.txt | ||
contains: MathieuSoysal/[email protected] | ||
|
||
- uses: GuillaumeFalourd/assert-command-line-output@v2 | ||
with: | ||
command_line: cat tests/test-maven.txt | ||
contains: cloud.tools:jib-maven-plugin:3.2.1 | ||
|
||
test-for-github-workflow: # Test the action with the GitHub workflow | ||
name: Test update-readme-files action | ||
name: Test update dependency | ||
needs: check-files | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
|
@@ -43,4 +48,25 @@ jobs: | |
uses: GuillaumeFalourd/assert-command-line-output@v2 | ||
with: | ||
command_line: cat tests/test2.txt | ||
contains: MathieuSoysal/[email protected] | ||
contains: MathieuSoysal/[email protected] | ||
|
||
|
||
|
||
# Test with a specific kind tag | ||
|
||
- name: Test kind of tag | ||
uses: ./ | ||
with: | ||
files: tests/test-maven.txt | ||
github_repository: GoogleContainerTools/jib | ||
prefix: "cloud.tools:jib-maven-plugin:" | ||
suffix: ":build ." | ||
regex: "[0-9.]*" | ||
selector: maven | ||
|
||
- name: Test if file has been updated | ||
uses: GuillaumeFalourd/assert-command-line-output@v2 | ||
with: | ||
command_line: cat tests/test-maven.txt | ||
contains: cloud.tools:jib-maven-plugin:3.2.1 | ||
expected_result: FAILED |
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
cache: maven | ||
|
||
- name: Build JIB container and publish to GitHub Packages | ||
run: | | ||
if [ ! -z "${{ inputs.module }}" ]; then | ||
MULTI_MODULE_ARGS="-am -pl ${{ inputs.module }}" | ||
fi | ||
if [ ! -z "${{ inputs.main-class }}" ]; then | ||
MAIN_CLASS_ARGS="-Djib.container.mainClass=${{ inputs.main-class }}" | ||
fi | ||
mvn package com.google.cloud.tools:jib-maven-plugin:3.2.1:build \ | ||
-Djib.to.image=${{ inputs.REGISTRY }}/${{ steps.downcase.outputs.lowercase }}:${{ inputs.tag-name }} \ | ||
-Djib.to.auth.username=${{ inputs.USERNAME }} \ | ||
-Djib.to.auth.password=${{ inputs.PASSWORD }} $MULTI_MODULE_ARGS $MAIN_CLASS_ARGS | ||
shell: bash |