-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.2 KB
/
other-create-application-yml.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Create application yml
on:
workflow_call:
inputs:
application_name:
required: true
type: string
jobs:
check-and-create-application-yml:
runs-on: ubuntu-latest
env:
APPLICATION_NAME: ${{ inputs.application_name }}
steps:
- name: test
run: |
echo "${{ inputs.application_name }}"
echo "${{ env.APPLICATION_NAME }}"
- name: Checkout code
uses: actions/checkout@v2
- name: Check if application.yml exists
id: check_file
uses: andstor/file-existence-action@v3
with:
files: "./${{ env.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 ./${{ env.APPLICATION_NAME }}/src/main/resources/application.yml
echo "${{ secrets.BACKEND_ENV }}" > ./${{ 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 }}" > ./${{ env.APPLICATION_NAME }}/src/main/resources/application.yml