Skip to content

Commit

Permalink
ci(GITHUB): move project from master -> main
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Mar 6, 2024
1 parent ca9dbd5 commit ccc5b21
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/actions/action-00-toolbox/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ runs:
using: "composite"
steps:
- name: Toolbox - Install CICD-Tools Toolbox
uses: cicd-tools-org/cicd-tools/.github/actions/action-00-toolbox@master
uses: cicd-tools-org/cicd-tools/.github/actions/action-00-toolbox@main
with:
PROJECT_ROOT_PATH: ${{ inputs.PROJECT_ROOT_PATH }}
2 changes: 1 addition & 1 deletion .github/config/workflows/workflow-push.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ci_concurrency_limit": 4,
"ci_extra_release_content": [
"### Release Checklist",
"- [] Ensure master is synchronized with the release tag."
"- [] Ensure main is synchronized with the release tag."
],
"ci_python_versions": ["3.9"],
"ci_trufflehog_extra_scan_args": "",
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/step-setup-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# PROJECT_NAME: The slugified name of the template project. Should match the GitHub repository name.
# PROJECT_OWNER: The GitHub owner of the project.
# PUSH_FALLBACK_REV_RANGE: The fallback value for linting commits with commitizen. This should be set to either "HEAD" (all commits) or the first compatible commit in your Git History.
# TEMPLATE_BRANCH_NAME_BASE: The name of the templated repository's default branch name. (Defaults to 'master'.)
# TEMPLATE_BRANCH_NAME_BASE: The name of the templated repository's default branch name. (Defaults to 'main'.)
# TEMPLATE_BRANCH_NAME_DEVELOPMENT: The name of the templated repository's development branch name. (Defaults to 'dev'.)

# CI only script.
Expand Down Expand Up @@ -39,7 +39,7 @@ main() {
echo "PROJECT_NAME=${PROJECT_NAME}"
echo "PROJECT_OWNER=${PROJECT_OWNER}"
echo "PUSH_FALLBACK_REV_RANGE=${PUSH_FALLBACK_REV_RANGE}"
echo "TEMPLATE_BRANCH_NAME_BASE=${TEMPLATE_BRANCH_NAME_BASE-master}"
echo "TEMPLATE_BRANCH_NAME_BASE=${TEMPLATE_BRANCH_NAME_BASE-main}"
echo "TEMPLATE_BRANCH_NAME_DEVELOPMENT=${TEMPLATE_BRANCH_NAME_DEVELOPMENT-dev}"
} >> "${GITHUB_ENV}"

Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/workflow-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ on:
jobs:

configuration:
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-read_json_file.yml@master
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"

start:
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@master
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!"
Expand All @@ -31,7 +31,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-10-generic-security_scan_credentials.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-10-generic-security_scan_credentials.yml@main
with:
EXTRA_BINARY_ARGS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_trufflehog_extra_scan_args }}
VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }}
Expand All @@ -40,7 +40,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-30-generic-markdown_links.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-30-generic-markdown_links.yml@main
with:
CONFIG_FILE: ".github/config/actions/gaurav-nelson-github-action-markdown-link-check.json"
VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }}
Expand All @@ -49,7 +49,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-50-poetry-test_basic_precommit_hooks.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-50-poetry-test_basic_precommit_hooks.yml@main
with:
CHECK_TOML: true
CHECK_WORKFLOW: true
Expand All @@ -61,7 +61,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-rev_range_command.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-rev_range_command.yml@main
with:
COMMAND: |
poetry run cz check --rev-range "${PUSHED_COMMIT_REV_RANGE}"
Expand All @@ -75,7 +75,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-rev_range_command.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-rev_range_command.yml@main
with:
COMMAND: |
CICD_COMMIT_MESSAGES_FILE="$(mktemp XXXXXXXX.git_history_file)"
Expand All @@ -91,7 +91,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRECOMMIT_HOOK_ID: "check-jsonschema"
Expand All @@ -103,7 +103,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRECOMMIT_HOOK_ID: "lint-markdown"
Expand All @@ -115,7 +115,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRECOMMIT_HOOK_ID: "spelling-markdown"
Expand All @@ -127,7 +127,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRECOMMIT_HOOK_ID: "format-toml"
Expand All @@ -148,7 +148,7 @@ jobs:
- id: "lint-github-workflow-header"
name: "Workflow Header Linting"
max-parallel: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRECOMMIT_HOOK_ID: ${{ matrix.hook.id }}
Expand All @@ -160,7 +160,7 @@ jobs:
needs: [configuration]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRECOMMIT_HOOK_ID: "yamllint"
Expand All @@ -174,15 +174,15 @@ jobs:
needs: [commit_lint, commit_spell_check, configuration, json_schema_lint, markdown_links, markdown_lint, markdown_spelling, pre-commit_hooks, security, start, toml_lint, workflow_lint, yaml_lint]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-99-poetry-create_release.yml@master
uses: cicd-tools-org/cicd-tools/.github/workflows/job-99-poetry-create_release.yml@main
with:
JSON_APPENDED_CONTENT: ${{ toJSON(fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_extra_release_content) }}

success:
needs: [create_release]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@master
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!"
16 changes: 8 additions & 8 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- id: format-shell
name: format-shell
description: "Format the project's shell scripts."
entry: --entrypoint=shfmt --env=FORCE_COLOR=1 ghcr.io/cicd-tools-org/cicd-tools:master
entry: --entrypoint=shfmt --env=FORCE_COLOR=1 ghcr.io/cicd-tools-org/cicd-tools:main
args:
- "-w"
- "--indent=2"
Expand All @@ -16,7 +16,7 @@
- id: format-toml
name: format-toml
description: "Format the project's TOML files."
entry: --entrypoint=tomll --env=FORCE_COLOR=1 ghcr.io/cicd-tools-org/cicd-tools:master
entry: --entrypoint=tomll --env=FORCE_COLOR=1 ghcr.io/cicd-tools-org/cicd-tools:main
files: "^.+\\.toml$"
language: docker_image
pass_filenames: true
Expand All @@ -31,14 +31,14 @@
- id: lint-dockerfile
name: lint-dockerfile
description: "Lint the project's Dockerfiles."
entry: --entrypoint=hadolint ghcr.io/cicd-tools-org/cicd-tools:master
entry: --entrypoint=hadolint ghcr.io/cicd-tools-org/cicd-tools:main
types: ["dockerfile"]
language: docker_image
stages: [commit]
- id: lint-github-workflow
name: lint-github-workflow
description: "Lint the project's GitHub workflow files."
entry: --entrypoint=actionlint ghcr.io/cicd-tools-org/cicd-tools:master
entry: --entrypoint=actionlint ghcr.io/cicd-tools-org/cicd-tools:main
args:
- "-color"
- "-config-file"
Expand Down Expand Up @@ -69,7 +69,7 @@
- id: lint-shell
name: lint-shell
description: "Lint the project's shell scripts."
entry: --entrypoint=shellcheck ghcr.io/cicd-tools-org/cicd-tools:master
entry: --entrypoint=shellcheck ghcr.io/cicd-tools-org/cicd-tools:main
args:
- "--color=always"
- "--source-path=SCRIPTDIR"
Expand Down Expand Up @@ -99,7 +99,7 @@
description: "Check the spelling on the commit message."
entry: ./.cicd-tools/boxes/bootstrap/pre-commit/spelling-commit-message.sh
args:
- "ghcr.io/cicd-tools-org/cicd-tools:master"
- "ghcr.io/cicd-tools-org/cicd-tools:main"
language: system
pass_filenames: true
stages: [commit-msg]
Expand All @@ -108,15 +108,15 @@
- id: spelling-markdown
name: spelling-markdown
description: "Spellcheck the Markdown files."
entry: --entrypoint=vale ghcr.io/cicd-tools-org/cicd-tools:master
entry: --entrypoint=vale ghcr.io/cicd-tools-org/cicd-tools:main
files: "^.+\\.md$"
language: docker_image
pass_filenames: true
stages: [commit]
- id: spelling-vale-synchronize
name: spelling-vale-synchronize
description: "Download any required vale packages."
entry: --mount type=tmpfs,destination=/tmp --entrypoint=vale ghcr.io/cicd-tools-org/cicd-tools:master
entry: --mount type=tmpfs,destination=/tmp --entrypoint=vale ghcr.io/cicd-tools-org/cicd-tools:main
args:
- "sync"
language: docker_image
Expand Down
Loading

0 comments on commit ccc5b21

Please sign in to comment.