Skip to content

feat(GITHUB): standardize workflow needs clauses #61

feat(GITHUB): standardize workflow needs clauses

feat(GITHUB): standardize workflow needs clauses #61

---
name: cicd-tooling-github-workflow-compose-command
on:
push:
paths:
- ".github/workflows/job-40-compose-run_cached_commands.yml"
- ".github/workflows/workflow-compose-command.yml"
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
# secrets:
# SLACK_WEBHOOK:
# description: "Optional, enables Slack notifications."
# required: false
jobs:
configuration:
uses: ./.github/workflows/job-00-generic-read_json_file.yml
with:
JSON_FILE_PATH: cookiecutter.json
start:
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: ./.github/workflows/job-00-generic-notification.yml
with:
NOTIFICATION_EMOJI: ":vertical_traffic_light:"
NOTIFICATION_MESSAGE: "Workflow has started!"
WORKFLOW_NAME: "compose"
compose_commands:
needs:
- configuration
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: ./.github/workflows/job-40-compose-run_cached_commands.yml
with:
COMMANDS: |
echo "Running Commands..."
uptime
echo "Finished Running Commands!"
COMPOSE_BUILDX_CACHED_SERVICE_NAME: "test_service"
COMPOSE_BUILDX_CACHE_KEY: "test_service"
COMPOSE_SERVICE_NAME: "test_service"
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA)._GITHUB_CI_DEFAULT_CONCURRENCY }}
EXECUTION_PATH: "{{cookiecutter.project_slug}}/compose"
VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS }}
WORKFLOW_NAME: "compose"
success:
needs:
- configuration
- compose_commands
- start
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: ./.github/workflows/job-00-generic-notification.yml
with:
NOTIFICATION_EMOJI: ":checkered_flag:"
NOTIFICATION_MESSAGE: "Workflow has completed successfully!"
WORKFLOW_NAME: "compose"