Skip to content

Commented run key in heroku:deploy section #162

Commented run key in heroku:deploy section

Commented run key in heroku:deploy section #162

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven and Heroku Environment
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: self-hosted #ubuntu-latest${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4 # name: Set up JDK 17
with:
java-version: '17'
distribution: 'temurin'
cache: maven
maven-version: '4.0.0-beta-3'
- name: Configure Maven settings.xml
run: |
mkdir -p ~/.m2
echo "<settings>
<servers>
<server>
<id>github</id>
<username>\${env.GITHUB_USERNAME}</username>
<password>\${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>" > ~/.m2/settings.xml
env:
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Maven
run:
mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=4.0.0-beta-3"
- name: Build with Maven
run: mvn -B package --file pom.xml -UX
- name: Install Maven Package
run:
mvn -UX clean install
#dependency:purge-local-repository -Dinclude=com.esdrasdemorais -Dddd=groupId -Dverbose=true
- name: Checkout heroku-deploy latest version code and Deploy to Heroku Environment
#run: |
# mvn -UX heroku:deploy #&& heroku:logs --tail --app drones
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "drones"
heroku_email: "[email protected]"
dontuseforce: true
dontautocreate: true
healthcheck: "https://[YOUR APP's NAME].herokuapp.com/health"
delay: 7
checkstring: "ok"
rollbackonhealthcheckfailed: true
env:
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SECRETS_VARS: ${{ toJson(secrets) }}
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "drones"
heroku_email: "[email protected]"
#&& echo "$GITHUB_USERNAME" > "secrets.txt" && cat secrets.txt
#mvn dependency:purge-local-repository -UX && mvn dependency:resolve -UX &&
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
#- name: Update dependency graph
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
# echo "$SECRETS_VARS" > "secrets.txt" && cat secrets.txt