Skip to content

deploy-trigger

deploy-trigger #41

Workflow file for this run

name: deploy_to_heroku
on:
repository_dispatch:
types: [deploy-trigger]
permissions:
contents: write
jobs:
build_and_release:
concurrency:
group: deploy-${{ github.event.client_payload.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
go: [1.21]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: Deploy Local Flight Map to Heroku
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install.sh | sh
- name: Get app url
uses: akhileshns/heroku-deploy@v3.14.15
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ""
heroku_email: ${{ secrets.HEROKU_USER_EMAIL }}
justlogin: true
- name: Export app config
id: export_app_config
run: |
HEROKU_APP_URL=$(heroku apps:info --app="${{ secrets.HEROKU_APP_NAME }}" --json | jq -r '.app.web_url | rtrimstr("/")')
cat <<EOF >> "$GITHUB_OUTPUT"
HEROKU_APP_URL=$HEROKU_APP_URL
EOF
- name: Deploy to Heroku
uses: akhileshns/heroku-deploy@v3.14.15
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
heroku_email: ${{ secrets.HEROKU_USER_EMAIL }}
healthcheck: "${{ steps.export_app_config.outputs.HEROKU_APP_URL }}/service/health"
rollbackonhealthcheckfailed: true
usedocker: true
delay: 5
env:
HD_ADSBEXCHANGE_API_KEY: ${{ secrets.ADSBEXCHANGE_API_KEY }}
HD_DATA_PROVIDER: ${{ secrets.DATA_PROVIDER }}
HD_ADSBEXCHANGE_FEEDER_UUID: ${{ secrets.ADSBEXCHANGE_FEEDER_UUID }}
HD_MAP_REFRESH_INTERVAL: ${{ secrets.MAP_REFRESH_INTERVAL }}
HD_OPENSKY_CLIENT_ID: ${{ secrets.OPENSKY_CLIENT_ID }}
HD_OPENSKY_CLIENT_SECRET: ${{ secrets.OPENSKY_CLIENT_SECRET }}