From d1ee00c8c7528a62766f924b60dd2ed3ec0bf416 Mon Sep 17 00:00:00 2001 From: Matthias Kay Date: Wed, 8 May 2024 17:21:17 +0200 Subject: [PATCH] MAIN.WORKFLOW --- .github/workflows/this_linter.yml | 3 +-- .github/workflows/this_pull_request.yml | 3 +-- .github/workflows/this_release.yml | 3 +-- .github/workflows/this_release_dry_run.yml | 3 +-- .github/workflows/this_renovate_auto_approve.yml | 3 +-- .github/workflows/this_slash_ops_command_help.yml | 3 +-- .github/workflows/this_slash_ops_comment_dispatch.yml | 3 +-- .github/workflows/this_spelling.yml | 3 +-- .github/workflows/this_stale.yml | 3 +-- .github/workflows/this_welcome_message.yml | 3 +-- setup-workflows.sh | 5 ++++- 11 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/this_linter.yml b/.github/workflows/this_linter.yml index 3ca0be6..dccc344 100644 --- a/.github/workflows/this_linter.yml +++ b/.github/workflows/this_linter.yml @@ -7,6 +7,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_linter_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_linter_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_pull_request.yml b/.github/workflows/this_pull_request.yml index bd213bd..0dc80d4 100644 --- a/.github/workflows/this_pull_request.yml +++ b/.github/workflows/this_pull_request.yml @@ -13,6 +13,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_pull_request_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_pull_request_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_release.yml b/.github/workflows/this_release.yml index 39e3bb1..bafbbf7 100644 --- a/.github/workflows/this_release.yml +++ b/.github/workflows/this_release.yml @@ -9,6 +9,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_release_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_release_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_release_dry_run.yml b/.github/workflows/this_release_dry_run.yml index b73f65f..d99af41 100644 --- a/.github/workflows/this_release_dry_run.yml +++ b/.github/workflows/this_release_dry_run.yml @@ -9,6 +9,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_release_dry_run_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_release_dry_run_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_renovate_auto_approve.yml b/.github/workflows/this_renovate_auto_approve.yml index f3966e7..c36e7e3 100644 --- a/.github/workflows/this_renovate_auto_approve.yml +++ b/.github/workflows/this_renovate_auto_approve.yml @@ -6,6 +6,5 @@ on: pull_request_target jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_renovate_auto_approve_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_renovate_auto_approve_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_slash_ops_command_help.yml b/.github/workflows/this_slash_ops_command_help.yml index 492d2c7..bcdf962 100644 --- a/.github/workflows/this_slash_ops_command_help.yml +++ b/.github/workflows/this_slash_ops_command_help.yml @@ -9,6 +9,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_slash_ops_command_help_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_slash_ops_command_help_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_slash_ops_comment_dispatch.yml b/.github/workflows/this_slash_ops_comment_dispatch.yml index 9b85d93..df9c90f 100644 --- a/.github/workflows/this_slash_ops_comment_dispatch.yml +++ b/.github/workflows/this_slash_ops_comment_dispatch.yml @@ -9,6 +9,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_slash_ops_comment_dispatch_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_slash_ops_comment_dispatch_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_spelling.yml b/.github/workflows/this_spelling.yml index 75e2af1..10865e3 100644 --- a/.github/workflows/this_spelling.yml +++ b/.github/workflows/this_spelling.yml @@ -7,6 +7,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_spelling_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_spelling_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_stale.yml b/.github/workflows/this_stale.yml index e438bc2..48f9fd5 100644 --- a/.github/workflows/this_stale.yml +++ b/.github/workflows/this_stale.yml @@ -8,6 +8,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_stale_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_stale_callable.yml@main secrets: inherit diff --git a/.github/workflows/this_welcome_message.yml b/.github/workflows/this_welcome_message.yml index 875563f..8409626 100644 --- a/.github/workflows/this_welcome_message.yml +++ b/.github/workflows/this_welcome_message.yml @@ -9,6 +9,5 @@ on: jobs: default: - # using stable to be able to quickly switch to a working version in case the current stable is broken - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_welcome_message_callable.yml + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_welcome_message_callable.yml@main secrets: inherit diff --git a/setup-workflows.sh b/setup-workflows.sh index 4c8bc6d..72b59fc 100755 --- a/setup-workflows.sh +++ b/setup-workflows.sh @@ -78,10 +78,13 @@ do # remove everything else as we will reference the file in this repository sed -i '/jobs:/,$d' "$file" + # add a reference to this repository which holds the workflow + commit_sha=$(git rev-parse HEAD) + cat >> "$file" <<-EOF jobs: default: - uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/$base_name + uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/$base_name@$commit_sha secrets: inherit EOF