-
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.
- Loading branch information
1 parent
6c3efd7
commit ed08ec7
Showing
2 changed files
with
54 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Git Common Flow | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: Run tests | ||
run: ./gradlew test | ||
|
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,34 @@ | ||
name: Create application yml | ||
on: workflow_call | ||
|
||
env: | ||
APPLICATION_NAME: ${{ inputs.application_name }} | ||
|
||
|
||
jobs: | ||
check-and-create-application-yml: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if application.yml exists | ||
id: check_file | ||
uses: andstor/file-existence-action@v3 | ||
with: | ||
files: "./$APPLICATION_NAME/src/main/resources/application.yml" | ||
|
||
- name: Create application.yml if it does not exist | ||
if: steps.check_file.outputs.files_exists == 'false' | ||
run: | | ||
touch ./sms-APPLICATION_NAME/src/main/resources/application.yml | ||
echo "${{ secrets.BACKEND_ENV }}" > ./$APPLICATION_NAME/src/main/resources/application.yml | ||
shell: bash | ||
|
||
- name: Perform action if application.yml exists | ||
if: steps.check_file.outputs.files_exists == 'true' | ||
run: | | ||
echo "${{ secrets.BACKEND_ENV }}" > ./$APPLICATION_NAME/src/main/resources/application.yml |