From 064cc17e7465747625ce42e75fdc2eb011672f5f Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 21 May 2024 15:01:26 +0300 Subject: [PATCH] Update github actions for updating jakarta and arlington branches --- .github/workflows/update-arlington-workflow.yml | 8 +++++--- .github/workflows/update-jakarta-workflow.yml | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-arlington-workflow.yml b/.github/workflows/update-arlington-workflow.yml index 3a47a72..4d7bb2d 100644 --- a/.github/workflows/update-arlington-workflow.yml +++ b/.github/workflows/update-arlington-workflow.yml @@ -7,6 +7,7 @@ on: jobs: checkout-and-build: + if: github.repository == 'veraPDF/veraPDF-integration-tests' runs-on: ubuntu-latest strategy: @@ -31,12 +32,12 @@ jobs: run: | git fetch origin arlington:arlington git checkout -b test-branch arlington - - name: Configure user nameF + - name: Configure user name run: | git config user.name "Git User" git config user.email "user@test.com" - name: Add commit to the test branch - run: git cherry-pick -m 1 ${{ github.sha }} + run: git cherry-pick -m 1 ${{ github.event.before }}..${{ github.event.after }} - name: Build project with Maven if: success() run: mvn --batch-mode --update-snapshots verify @@ -62,7 +63,7 @@ jobs: git config user.name "Git User" git config user.email "user@temp.com" - name: Add commit to new branch - run: git cherry-pick -m 1 ${{ github.sha }} + run: git cherry-pick -m 1 ${{ github.event.before }}..${{ github.event.after }} - name: Merge branch into arlington if: success() run: | @@ -78,6 +79,7 @@ jobs: needs: [checkout-and-build, merge] if: | always() && + github.repository == 'veraPDF/veraPDF-integration-tests' && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) diff --git a/.github/workflows/update-jakarta-workflow.yml b/.github/workflows/update-jakarta-workflow.yml index 8dfd651..aa00d6d 100644 --- a/.github/workflows/update-jakarta-workflow.yml +++ b/.github/workflows/update-jakarta-workflow.yml @@ -7,6 +7,7 @@ on: jobs: checkout-and-build: + if: github.repository == 'veraPDF/veraPDF-integration-tests' runs-on: ubuntu-latest strategy: @@ -36,7 +37,7 @@ jobs: git config user.name "Git User" git config user.email "user@test.com" - name: Add commit to the test branch - run: git cherry-pick -m 1 ${{ github.sha }} + run: git cherry-pick -m 1 ${{ github.event.before }}..${{ github.event.after }} - name: Build project with Maven if: success() run: mvn --batch-mode --update-snapshots verify @@ -62,7 +63,7 @@ jobs: git config user.name "Git User" git config user.email "user@temp.com" - name: Add commit to new branch - run: git cherry-pick -m 1 ${{ github.sha }} + run: git cherry-pick -m 1 ${{ github.event.before }}..${{ github.event.after }} - name: Merge branch into jakarta if: success() run: | @@ -78,6 +79,7 @@ jobs: needs: [checkout-and-build, merge] if: | always() && + github.repository == 'veraPDF/veraPDF-integration-tests' && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled'))