Skip to content

Commit

Permalink
Update maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
luuh-oliveira committed May 17, 2024
1 parent 1d10985 commit a35d29c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

env:
azure.storage.connection.string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
azure.storage.container.name: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
azure.storage.url: ${{ secrets.AZURE_STORAGE_URL }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
AZURE_STORAGE_URL: ${{ secrets.AZURE_STORAGE_URL }}

steps:
- uses: actions/checkout@v3
Expand All @@ -26,13 +26,16 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Create application.properties
run: |
echo "azure.storage.url=${AZURE_STORAGE_URL}" > src/main/resources/application.properties
echo "azure.storage.container.name=${AZURE_STORAGE_CONTAINER_NAME}" >> src/main/resources/application.properties
echo "azure.storage.connection.string=${AZURE_STORAGE_CONNECTION_STRING}" >> src/main/resources/application.properties

- name: Build with Maven
run: mvn -B package --file pom.xml \
-Dazure.storage.connection.string="${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" \
-Dazure.storage.container.name="${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}" \
-Dazure.storage.url="${{ secrets.AZURE_STORAGE_URL }}"

run: mvn -B package --file pom.xml

- name: Run tests
run: mvn -B test
Expand Down

0 comments on commit a35d29c

Please sign in to comment.