From 056179c62949dabe2ee8a76c1012c954acfff705 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 17:42:50 +0900 Subject: [PATCH 1/6] WORKFLOW: tentative solution for PRs - try#2 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index ba1f8785..9ac31a7c 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -57,7 +57,7 @@ jobs: submodules: 'true' - name: Checkout PR branch (include changes) - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} run: | git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge git checkout -qf FETCH_HEAD From 2cfc71b588481746fea39df93392952660c29bc7 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 17:52:19 +0900 Subject: [PATCH 2/6] WORKFLOW: tentative solution for PRs - try#3 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 9ac31a7c..bc9a6a40 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -55,12 +55,7 @@ jobs: uses: actions/checkout@v4 with: submodules: 'true' - - - name: Checkout PR branch (include changes) - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} - run: | - git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge - git checkout -qf FETCH_HEAD + ref: ${{ github.sha }} - name: "Install dependencies" run: "automation_tools/install_dependencies.sh" From 11877adc380c3475c8df863010d057b1177af4ce Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 17:56:21 +0900 Subject: [PATCH 3/6] WORKFLOW: simplyfing PR name [skip ci] --- .github/workflows/cooker-selfhosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index bc9a6a40..fd440a45 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -92,7 +92,7 @@ jobs: echo "[DEBUG] source branch is: $source_branch" # Generate the tag for a pull request - echo "TAG=PR-$GITHUB_RUN_ID-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV + echo "TAG=PR-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV echo "MAKE_LATEST=false" >> $GITHUB_ENV # Not marked as the latest cooker version if it's a feature branch else # Generate the tag for non-pull request branches From 5bad19fb3565eab7724de9c5db6e2a292c3b2a42 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 18:03:38 +0900 Subject: [PATCH 4/6] WORKFLOW: tentative solution for PRs - try#4 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index fd440a45..99aa131e 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -54,6 +54,7 @@ jobs: - name: Clone RetroDECK repo uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'true' ref: ${{ github.sha }} From dac75b31b24bf7f547d52fb55713f6fd11521b23 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 18:10:40 +0900 Subject: [PATCH 5/6] WORKFLOW: tentative solution for PRs - try#5 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 99aa131e..cc3e7a64 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -15,9 +15,8 @@ on: - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: - branches: - - cooker* + pull_request_target: + pull_request: # Italy (CET): 11:00 PM # Japan (JST): 7:00 AM From de743a3e230ce376b2fec70dba1d74eacdbe9908 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 20:56:43 +0900 Subject: [PATCH 6/6] WORKFLOW: tentative solution for PRs - try#8 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index cc3e7a64..17c0855a 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -5,17 +5,16 @@ on: branches: - cooker* - feat* + - branch/cooker* paths: - '.github/workflows/**' - 'automation_tools/**' - 'config/**' - - 'config/es-de/**' - 'functions/**' - 'rd-submodules/**' - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: pull_request: # Italy (CET): 11:00 PM @@ -32,7 +31,7 @@ jobs: Building_RetroDECK: runs-on: retrodeck - steps: + steps: # Circumventing this bug: https://github.com/flatpak/flatpak-builder/issues/317 - name: Remove stuck mounts @@ -53,9 +52,7 @@ jobs: - name: Clone RetroDECK repo uses: actions/checkout@v4 with: - fetch-depth: 0 submodules: 'true' - ref: ${{ github.sha }} - name: "Install dependencies" run: "automation_tools/install_dependencies.sh"