From 8beba83a73ce541df7142f656a568089f3a6fa2e Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 14:31:10 +0900 Subject: [PATCH 01/24] delete workflow runs --- .github/workflows/build_chain.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 813a00d..cafce39 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -10,13 +10,6 @@ jobs: - name: Echo inside this repo run: | echo "echo inside TestUpperStream" - # - name: Delete workflow runs - # uses: MajorScruffy/delete-old-workflow-runs@v0.2.0 - # with: - # repository: wuisky/try-dispatched - # older-than-seconds: 1 - # workflow: .github/workflows/workflow.yml - # # event: workflow_dispatch - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 with: From 9bc6905732bdd5fb5b74ad028a78615b5c42f04a Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 14:35:58 +0900 Subject: [PATCH 02/24] env github token --- .github/workflows/build_chain.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index cafce39..db47e1e 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -3,7 +3,8 @@ permissions: {} jobs: build-chain: env: - GITHUB_TOKEN: ${{ secrets.STANDARD_RIGHTS }} + GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.STANDARD_RIGHTS }} permissions: write-all runs-on: ubuntu-latest steps: @@ -32,7 +33,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} checkName: build-chain - intervalSeconds: 10 + intervalSeconds: 5 - name: Build failure if: steps.wait-for-build-common.outputs.conclusion != 'success' uses: actions/github-script@v6.4.0 From 143e329655af061f73140f1eb87402fcb8a2f9ec Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 14:37:39 +0900 Subject: [PATCH 03/24] delete with github token --- .github/workflows/build_chain.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index db47e1e..864859e 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -14,7 +14,8 @@ jobs: - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 with: - token: ${{ secrets.STANDARD_RIGHTS }} + # token: ${{ secrets.STANDARD_RIGHTS }} + token: ${{ secrets.GITHUB_TOKEN }} repository: wuisky/try-dispatched retain_days: 0 keep_minimum_runs: 0 From 1108b6e6a4843af595c6e2751bf1be9c15e49058 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 14:38:59 +0900 Subject: [PATCH 04/24] wait dispatch with github token --- .github/workflows/build_chain.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 864859e..239e2ee 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -14,8 +14,7 @@ jobs: - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 with: - # token: ${{ secrets.STANDARD_RIGHTS }} - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.STANDARD_RIGHTS }} repository: wuisky/try-dispatched retain_days: 0 keep_minimum_runs: 0 @@ -32,7 +31,8 @@ jobs: with: repo: try-dispatched ref: master - token: ${{ secrets.STANDARD_RIGHTS }} + # token: ${{ secrets.STANDARD_RIGHTS }} + token: ${{ secrets.GITHUB_TOKEN }} checkName: build-chain intervalSeconds: 5 - name: Build failure From cf68e03e4d27d23776a9b3720cce9e0aff65ac4e Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 15:22:51 +0900 Subject: [PATCH 05/24] pass upstream_branch --- .github/workflows/build_chain.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 239e2ee..f404c8b 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,6 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml + inputs: "{ 'upstream_branch': '${{ github.head_ref }}' }" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 2e1cfe2a694336b214ce722441bed33620ea6d18 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 15:25:04 +0900 Subject: [PATCH 06/24] fix quat --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index f404c8b..c9ddb55 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': '${{ github.head_ref }}' }" + inputs: "{ 'upstream_branch': ${{ github.head_ref }} }" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From e03644649b63c9ee38dfe6937c25412f0e8ee633 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 15:27:14 +0900 Subject: [PATCH 07/24] add sha --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index c9ddb55..e83e595 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': ${{ github.head_ref }} }" + inputs: "{ 'upstream_branch': '${{ github.ref }}', 'sha': '${{ github.sha }}'}' - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 69615556be1fbe7aecfab8ae655e062316dd2ae6 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 15:28:18 +0900 Subject: [PATCH 08/24] fix quat --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index e83e595..4f4e654 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': '${{ github.ref }}', 'sha': '${{ github.sha }}'}' + inputs: "{ 'upstream_branch': '${{ github.ref }}', 'sha': '${{ github.sha }}'}" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From e2e07beb28e73ed96dda83d4affea6914b595fdc Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 15:34:50 +0900 Subject: [PATCH 09/24] on_pull request --- .github/workflows/build_chain.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 4f4e654..963449f 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -1,4 +1,4 @@ -on: [push] +on: [pull_request] permissions: {} jobs: build-chain: @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': '${{ github.ref }}', 'sha': '${{ github.sha }}'}" + inputs: "{ 'upstream_branch': '${{ github.head_ref }}', 'sha': '${{ github.sha }}'}" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 0d385ae8ce6987a6d7fec0d17ba13e8faef51c8a Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:01:33 +0900 Subject: [PATCH 10/24] rm sha pass --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 963449f..8ca7d82 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': '${{ github.head_ref }}', 'sha': '${{ github.sha }}'}" + inputs: "{ 'upstream_branch': '${{ github.head_ref }}'}" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 789a08b8d000e71741f4831b81079b55bf471ac0 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:29:23 +0900 Subject: [PATCH 11/24] try 1.1 --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 8ca7d82..3113185 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -19,7 +19,7 @@ jobs: retain_days: 0 keep_minimum_runs: 0 - name: Invoke workflow in another repo - uses: benc-uk/workflow-dispatch@v1.2.2 + uses: benc-uk/workflow-dispatch@v1.1 with: repo: wuisky/try-dispatched ref: master From f5af6a75c78059fc6b3265c9f24fe245cffd3088 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:30:34 +0900 Subject: [PATCH 12/24] delete inputs --- .github/workflows/build_chain.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 3113185..c967eef 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -19,13 +19,13 @@ jobs: retain_days: 0 keep_minimum_runs: 0 - name: Invoke workflow in another repo - uses: benc-uk/workflow-dispatch@v1.1 + uses: benc-uk/workflow-dispatch@v1.2.2 with: repo: wuisky/try-dispatched ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': '${{ github.head_ref }}'}" + # inputs: "{ 'upstream_branch': '${{ github.head_ref }}'}" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From dafd09c6ebd58c814144947548ca0166789e5635 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:33:17 +0900 Subject: [PATCH 13/24] unquoat --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index c967eef..784fdba 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - # inputs: "{ 'upstream_branch': '${{ github.head_ref }}'}" + inputs: "{ 'upstream_branch': ${{ github.head_ref }}}" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 036374c2197134f4afee2748c1396fabfb46d0d7 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:35:04 +0900 Subject: [PATCH 14/24] hardcoding branch name --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 784fdba..adc820c 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': ${{ github.head_ref }}}" + inputs: "{ 'upstream_branch': 'upsetrem' }" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From b6d4d831eef63c4587daff334da0e14745eaba73 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:37:22 +0900 Subject: [PATCH 15/24] no inputs --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index adc820c..abf97c4 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': 'upsetrem' }" + # inputs: "{ 'upstream_branch': 'upsetrem' }" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 10a093ed6da77559accc246b9806ff582dfca588 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:40:39 +0900 Subject: [PATCH 16/24] pass head_ref --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index abf97c4..8ca7d82 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - # inputs: "{ 'upstream_branch': 'upsetrem' }" + inputs: "{ 'upstream_branch': '${{ github.head_ref }}'}" - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 54d51c2c30635412e2f7b8e5bff4e9501dc4adc5 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 16:43:48 +0900 Subject: [PATCH 17/24] use double quote --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 8ca7d82..fedf90f 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -25,7 +25,7 @@ jobs: ref: master token: ${{ secrets.STANDARD_RIGHTS }} workflow: workflow.yml - inputs: "{ 'upstream_branch': '${{ github.head_ref }}'}" + inputs: '{ "upstream_branch": "${{ github.head_ref }}"}' - name: Wait dispatch uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build-common From 487a7c95338440d3e30c5181d04ede5a82f1437a Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 17:11:15 +0900 Subject: [PATCH 18/24] comment out github token env --- .github/workflows/build_chain.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index fedf90f..74cea8a 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -2,8 +2,8 @@ on: [pull_request] permissions: {} jobs: build-chain: - env: - GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} + # env: + # GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # GITHUB_TOKEN: ${{ secrets.STANDARD_RIGHTS }} permissions: write-all runs-on: ubuntu-latest From 2c4c843040787284868bdd95b4b28afa3384a21c Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 17:44:49 +0900 Subject: [PATCH 19/24] use app_id --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 74cea8a..b0e911d 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -14,7 +14,7 @@ jobs: - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 with: - token: ${{ secrets.STANDARD_RIGHTS }} + token: ${{ secrets.APP_ID }} repository: wuisky/try-dispatched retain_days: 0 keep_minimum_runs: 0 From 415ddbf2b40ef9ac29e90987a2f4d396231c1a63 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 17:48:19 +0900 Subject: [PATCH 20/24] use token generate --- .github/workflows/build_chain.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index b0e911d..170422c 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -11,10 +11,18 @@ jobs: - name: Echo inside this repo run: | echo "echo inside TestUpperStream" + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 with: - token: ${{ secrets.APP_ID }} + # token: ${{ secrets.STANDARD_RIGHTS }} + token: ${{ steps.generate_token.outputs.token }} repository: wuisky/try-dispatched retain_days: 0 keep_minimum_runs: 0 From 30285c723512fb4a5beaa7c138fcbb2c73d10d31 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Thu, 23 Mar 2023 18:04:48 +0900 Subject: [PATCH 21/24] get rid of personal token --- .github/workflows/build_chain.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 170422c..9806348 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -31,7 +31,8 @@ jobs: with: repo: wuisky/try-dispatched ref: master - token: ${{ secrets.STANDARD_RIGHTS }} + # token: ${{ secrets.STANDARD_RIGHTS }} + token: ${{ steps.generate_token.outputs.token }} workflow: workflow.yml inputs: '{ "upstream_branch": "${{ github.head_ref }}"}' - name: Wait dispatch From 692a30f8c455fe8023f240603835b5e97dd307ae Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Fri, 24 Mar 2023 10:07:51 +0900 Subject: [PATCH 22/24] add hoge.txt --- hoge.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 hoge.txt diff --git a/hoge.txt b/hoge.txt new file mode 100644 index 0000000..574d203 --- /dev/null +++ b/hoge.txt @@ -0,0 +1 @@ +gggg From 5f5829632d70e299986ee75d532759ef3d5d4a8b Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Fri, 24 Mar 2023 10:31:54 +0900 Subject: [PATCH 23/24] commnet out write-all --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 9806348..3e27765 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -5,7 +5,7 @@ jobs: # env: # GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # GITHUB_TOKEN: ${{ secrets.STANDARD_RIGHTS }} - permissions: write-all + # permissions: write-all runs-on: ubuntu-latest steps: - name: Echo inside this repo From dce4b347d7de5e0a286e0b3a7805983ee76d04d2 Mon Sep 17 00:00:00 2001 From: WU MENGHUNG Date: Fri, 24 Mar 2023 10:32:15 +0900 Subject: [PATCH 24/24] commentout permissions --- .github/workflows/build_chain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_chain.yml b/.github/workflows/build_chain.yml index 3e27765..2fe369e 100644 --- a/.github/workflows/build_chain.yml +++ b/.github/workflows/build_chain.yml @@ -1,5 +1,5 @@ on: [pull_request] -permissions: {} +# permissions: {} jobs: build-chain: # env: