Skip to content

Update resusable workflows #1

Update resusable workflows

Update resusable workflows #1

Workflow file for this run

on:
workflow_dispatch:
inputs:
check_config:
type: boolean
description: 'Fail when configuration overridden'
required: true
default: false
sql_backup:
type: boolean
description: 'Create SQL backup'
required: true
default: true
enable_maintenance_mode:
type: boolean
description: 'Enable maintenance mode.'
required: true
default: true
name: 'Deploy PROD instance'
jobs:
create_release_archive:
uses: ./.github/workflows/reusable/lib.create-release-archive.yml

Check failure on line 23 in .github/workflows/deploy-prod.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-prod.yml

Invalid workflow file

invalid value workflow reference: workflows must be defined at the top level of the .github/workflows/ directory
with:
# runner: ${{ vars.RUNNER_LABEL }}
php_version: ${{ vars.PROD_PHP_VERSION }}
checkout_ref: ${{ github.event.release.tag_name }}
use_ref_as_release_id: true
deploy_release:
uses: ./.github/workflows/reusable/lib.deploy-release.yml
needs: create_release_archive
with:
release_id: ${{ needs.create_release_archive.outputs.release_id }}
release_filename: ${{ needs.create_release_archive.outputs.release_filename }}
project_dir: ${{ vars.PROD_PROJECT_DIR }}
artifacts_dir: ${{ vars.PROD_ARTIFACTS_DIR }}
settings_file: ${{ vars.PROD_SETTINGS_FILE }}
public_files_dir: ${{ vars.PROD_PUBLIC_FILES_DIR }}
robo_file: ${{ vars.PROD_ROBO_FILE }}
local_services_file: ${{ vars.PROD_LOCAL_SERVICES_FILE }}
check_config: ${{ inputs.check_config }}
sql_backup: ${{ inputs.sql_backup }}
secrets:
ssh_user: ${{ secrets.PROD_SSH_USER }}
ssh_host: ${{ secrets.PROD_SSH_HOST }}
ssh_key: ${{ secrets.PROD_SSH_KEY }}
update_instance:
uses: ./.github/workflows/reusable/lib.update-instance.yml
needs: deploy_release
with:
project_dir: ${{ vars.PROD_PROJECT_DIR }}
enable_maintenance_mode: ${{ inputs.enable_maintenance_mode }}
cleanup_dir: ${{ vars.PROD_ARTIFACTS_DIR }}
retain: ${{ vars.RETAIN_RELEASES }}
deployment_url: ${{ vars.PROD_URL }}
notify_success: true
secrets:
ssh_user: ${{ secrets.PROD_SSH_USER }}
ssh_host: ${{ secrets.PROD_SSH_HOST }}
ssh_key: ${{ secrets.PROD_SSH_KEY }}
statuscake_api_key: ${{ secrets.STATUSCAKE_API_KEY }}
statuscake_test_id: ${{ secrets.PROD_STATUSCAKE_ID }}
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
notify_failure:
uses: ./.github/workflows/reusable/lib.notify-failure.yml
needs: [create_release_archive, deploy_release, update_instance]
if: failure()
with:
deployment_url: ${{ vars.PROD_URL }}
secrets:
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}