Merge pull request #624 from ita-social-projects/develop #120
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
name: Bump version, build and push to heroku | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/github-tag-action@v5 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release_branches: master | |
pre_release_branches: release | |
append_to_pre_release_tag: 'RC' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Run build with Gradle(check styles, run tests) | |
env: | |
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
run: ./gradlew build -Pversion=${{ steps.tag_version.outputs.new_tag }} | |
- name: Build the tagged Docker image | |
run: docker build -f .docker/dokazovi.Dockerfile -t dokazovi-dev . | |
- name: Build, Push and Deploy to Heroku | |
id: heroku | |
uses: snithyanantham/docker-compose-multiple-apps-heroku-deploy@v1.0 | |
with: | |
email: ${{ secrets.HEROKU_EMAIL }} | |
api_key: ${{ secrets.HEROKU_API_KEY }} | |
docker_compose_file: '.docker/docker-compose.heroku.yml' | |
heroku_apps: '[{"imagename":"dokazovi-dev","appname":"dokazovi-be-release","apptype":"web"}]' |