diff --git a/.github/workflows/default_release_callable.yml b/.github/workflows/default_release_callable.yml index 68e6297..9997a20 100644 --- a/.github/workflows/default_release_callable.yml +++ b/.github/workflows/default_release_callable.yml @@ -27,7 +27,7 @@ jobs: - name: Setup release run: | - # using same ref as in calling workflow + # using same ref as in calling workflow git clone https://github.com/Hapag-Lloyd/Workflow-Templates.git .release_clone git checkout ${{ github.action_ref }} diff --git a/.github/workflows/default_release_dry_run_callable.yml b/.github/workflows/default_release_dry_run_callable.yml index 5248a03..a8d2b61 100644 --- a/.github/workflows/default_release_dry_run_callable.yml +++ b/.github/workflows/default_release_dry_run_callable.yml @@ -27,7 +27,7 @@ jobs: - name: Setup release run: | - # using same ref as in calling workflow + # using same ref as in calling workflow git clone https://github.com/Hapag-Lloyd/Workflow-Templates.git .release_clone git checkout ${{ github.action_ref }} diff --git a/.github/workflows/maven_release_callable.yml b/.github/workflows/maven_release_callable.yml index 52e435e..de61a64 100644 --- a/.github/workflows/maven_release_callable.yml +++ b/.github/workflows/maven_release_callable.yml @@ -35,7 +35,7 @@ jobs: - name: Setup release run: | - # using same ref as in calling workflow + # using same ref as in calling workflow git clone https://github.com/Hapag-Lloyd/Workflow-Templates.git .release_clone git checkout ${{ github.action_ref }} diff --git a/.github/workflows/maven_release_dry_run_callable.yml b/.github/workflows/maven_release_dry_run_callable.yml index 900638f..63e68c2 100644 --- a/.github/workflows/maven_release_dry_run_callable.yml +++ b/.github/workflows/maven_release_dry_run_callable.yml @@ -35,7 +35,7 @@ jobs: - name: Setup release run: | - # using same ref as in calling workflow + # using same ref as in calling workflow git clone https://github.com/Hapag-Lloyd/Workflow-Templates.git .release_clone git checkout ${{ github.action_ref }} 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