diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index ff9abd8..c4c9094 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ "dev" ] -env: - RESOURCE_PATH: ../src/main/resources/application.yml - jobs: build: @@ -32,12 +29,13 @@ jobs: - name: Build with Gradle Wrapper run: ./gradlew build + env: - spring.profiles.active: dev + ACTIVE_PROFILE: ${{ secrets.ACTIVE_PROFILE }} - spring.datasource.url: ${{ secrets.DATASOURCE_URL_DEV }} - spring.datasource.username: ${{ secrets.DATASOURCE_USERNAME }} - spring.datasource.password: ${{ secrets.DATASOURCE_PASSWORD }} + DATASOURCE_URL_DEV: ${{ secrets.DATASOURCE_URL_DEV }} + DATASOURCE_USERNAME: ${{ secrets.DATASOURCE_USERNAME }} + DATASOURCE_PASSWORD: ${{ secrets.DATASOURCE_PASSWORD }} ACCESSTOKEN_EXPIREDDATE: ${{ secrets.ACCESSTOKEN_EXPIREDDATE }} @@ -59,10 +57,10 @@ jobs: - name: Docker build run: | - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t app . - docker tag app ${{ secrets.DOCKER_USERNAME }}/conet:latest - docker push ${{ secrets.DOCKER_USERNAME }}/conet:latest + sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + sudo docker build -t app . + sudo docker tag app ${{ secrets.DOCKER_USERNAME }}/conet:latest + sudo docker push ${{ secrets.DOCKER_USERNAME }}/conet:latest - name: Deploy uses: appleboy/ssh-action@master