You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2025/04/12 16:22:23 UTC

(logging-parent) 01/01: Use workflows on the same branch

This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch feat/same-branch-workflows
in repository https://gitbox.apache.org/repos/asf/logging-parent.git

commit bae42052c25abc6f055bc7cfd1208f757fed16b1
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Sat Apr 12 18:22:16 2025 +0200

    Use workflows on the same branch
    
    Since most of the PRs to `logging-parent` modify the workflows, we should not run the reusable workflows from the `@main` branch, but from the same branch as the PR.
    
    This PR changes all non-reusable workflows to use the `./.github/workflows/<workflow>` syntax, which uses the workflow file from the same branch as the calling workflow.
---
 .github/workflows/build.yaml            | 6 +++---
 .github/workflows/deploy-site.yaml      | 6 +++---
 .github/workflows/merge-dependabot.yaml | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index f7a0a46..124759a 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -44,14 +44,14 @@ jobs:
 
   build:
     if: github.actor != 'dependabot[bot]'
-    uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
+    uses: ./.github/workflows/build-reusable.yaml
     with:
       site-enabled: true
 
   deploy-snapshot:
     needs: build
     if: github.repository == 'apache/logging-parent' && github.ref_name == 'main'
-    uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@main
+    uses: ./.github/workflows/deploy-snapshot-reusable.yaml
     # Secrets for deployments
     secrets:
       NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
@@ -60,7 +60,7 @@ jobs:
   deploy-release:
     needs: build
     if: github.repository == 'apache/logging-parent' && startsWith(github.ref_name, 'release/')
-    uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@main
+    uses: ./.github/workflows/deploy-release-reusable.yaml
     # Secrets for deployments
     secrets:
       GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
diff --git a/.github/workflows/deploy-site.yaml b/.github/workflows/deploy-site.yaml
index 585c658..5155ce8 100644
--- a/.github/workflows/deploy-site.yaml
+++ b/.github/workflows/deploy-site.yaml
@@ -33,7 +33,7 @@ jobs:
 
   deploy-site-stg:
     if: github.repository == 'apache/logging-parent' && github.ref_name == 'main'
-    uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
+    uses: ./.github/workflows/deploy-site-reusable.yaml
     # Secrets for committing the generated site
     secrets:
       GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -50,7 +50,7 @@ jobs:
 
   deploy-site-pro:
     if: github.repository == 'apache/logging-parent' && github.ref_name == 'main-site-pro'
-    uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
+    uses: ./.github/workflows/deploy-site-reusable.yaml
     # Secrets for committing the generated site
     secrets:
       GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -81,7 +81,7 @@ jobs:
 
   deploy-site-rel:
     needs: export-version
-    uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
+    uses: ./.github/workflows/deploy-site-reusable.yaml
     # Secrets for committing the generated site
     secrets:
       GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
diff --git a/.github/workflows/merge-dependabot.yaml b/.github/workflows/merge-dependabot.yaml
index 5659155..2d611cc 100644
--- a/.github/workflows/merge-dependabot.yaml
+++ b/.github/workflows/merge-dependabot.yaml
@@ -30,11 +30,11 @@ jobs:
 
   build:
     if: github.repository == 'apache/logging-parent' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
-    uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
+    uses: ./.github/workflows/build-reusable.yaml
 
   merge-dependabot:
     needs: build
-    uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@main
+    uses: ./.github/workflows/merge-dependabot-reusable.yaml
     permissions:
       contents: write                                             # to push changelog commits
       pull-requests: write                                        # to close the PR