collection-github-workflow-downloader-push #126
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: collection-github-workflow-downloader-push | |
# For further details please consult the documentation here: | |
# https://github.com/niall-byrne/ansible-workbench | |
# Begin Cookiecutter Template Content | |
on: | |
push: | |
paths: | |
- ".github/workflows/workflow-downloader-push.yml" | |
- "roles/downloader/*" | |
- "roles/downloader/**/*" | |
schedule: | |
- cron: "0 6 * * 1" | |
workflow_dispatch: | |
# secrets: | |
# SLACK_WEBHOOK: | |
# description: "Optional, enables Slack notifications." | |
# required: false | |
jobs: | |
configuration: | |
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-read_json_file.yml@main | |
with: | |
JSON_FILE_PATH: ".github/config/workflows/workflow-push.json" | |
scenarios: | |
needs: [configuration] | |
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-identify_molecule_scenarios.yml@main | |
with: | |
MOLECULE_EXCLUSION_REGEX: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_molecule_excluded_scenarios_regex }} | |
MOLECULE_SCENARIO_PATH: "roles/downloader/molecule" | |
start: | |
secrets: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@main | |
with: | |
NOTIFICATION_EMOJI: ":vertical_traffic_light:" | |
NOTIFICATION_MESSAGE: "workflow has started!" | |
WORKFLOW_NAME: "downloader" | |
molecule_test: | |
needs: [configuration, scenarios] | |
secrets: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
strategy: | |
fail-fast: true | |
matrix: | |
scenario: ${{ fromJSON(needs.scenarios.outputs.SCENARIOS) }} | |
platform: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_molecule_test_platforms }} | |
max-parallel: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }} | |
uses: cicd-tools-org/cicd-tools/.github/workflows/job-40-poetry-molecule_command.yml@main | |
with: | |
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }} | |
MOLECULE_COMMAND: "test" | |
MOLECULE_SCENARIO: ${{ matrix.scenario }} | |
PLATFORM: ${{ matrix.platform }} | |
PYTHON_VERSIONS: ${{ toJSON(fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_python_versions) }} | |
TARGET_PATH: "roles/downloader" | |
VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }} | |
WORKFLOW_NAME: "downloader" | |
success: | |
needs: [molecule_test, start] | |
secrets: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@main | |
with: | |
NOTIFICATION_EMOJI: ":checkered_flag:" | |
NOTIFICATION_MESSAGE: "workflow has completed successfully!" | |
WORKFLOW_NAME: "downloader" | |
# End Cookiecutter Template Content |