From 72c9e4b443cd7e932bfd175e027f565688f0c6fb Mon Sep 17 00:00:00 2001 From: 1357310795 <35869804+1357310795@users.noreply.github.com> Date: Sun, 12 Feb 2023 09:14:01 +0800 Subject: [PATCH 1/6] Create clear.xml --- .github/workflows/clear.xml | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/clear.xml diff --git a/.github/workflows/clear.xml b/.github/workflows/clear.xml new file mode 100644 index 00000000000..32a786d0046 --- /dev/null +++ b/.github/workflows/clear.xml @@ -0,0 +1,57 @@ +name: Delete old workflow runs +on: + workflow_dispatch: + inputs: + days: + description: 'Number of days.' + required: true + default: 30 + minimum_runs: + description: 'The minimum runs to keep for each workflow.' + required: true + default: 6 + delete_workflow_pattern: + description: 'The name or filename of the workflow. if not set then it will target all workflows.' + required: false + delete_workflow_by_state_pattern: + description: 'Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually' + required: true + default: "All" + type: choice + options: + - "All" + - active + - deleted + - disabled_inactivity + - disabled_manually + delete_run_by_conclusion_pattern: + description: 'Remove workflow by conclusion: action_required, cancelled, failure, skipped, success' + required: true + default: "All" + type: choice + options: + - "All" + - action_required + - cancelled + - failure + - skipped + - success + dry_run: + description: 'Only log actions, do not perform any delete operations.' + required: false + +jobs: + del_runs: + runs-on: ubuntu-latest + steps: + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: ${{ github.event.inputs.days }} + keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} + delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} + delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }} + delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }} + dry_run: ${{ github.event.inputs.dry_run }} From ee33e825f4b7673f7a2e6ee827e5171fe80a585b Mon Sep 17 00:00:00 2001 From: 1357310795 <35869804+1357310795@users.noreply.github.com> Date: Sun, 12 Feb 2023 09:14:21 +0800 Subject: [PATCH 2/6] Rename clear.xml to clear.yml --- .github/workflows/{clear.xml => clear.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{clear.xml => clear.yml} (100%) diff --git a/.github/workflows/clear.xml b/.github/workflows/clear.yml similarity index 100% rename from .github/workflows/clear.xml rename to .github/workflows/clear.yml From f3a6910c0233816a9b69e271eb6f10d81620d360 Mon Sep 17 00:00:00 2001 From: 1357310795 <35869804+1357310795@users.noreply.github.com> Date: Sat, 16 Sep 2023 20:01:43 +0800 Subject: [PATCH 3/6] Update cli.yml --- .github/workflows/cli.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index fce6fd1b87f..1b66e76eb02 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -18,22 +18,28 @@ jobs: with: dotnet-version: 6.0.x - - name: Build for Windows + - name: Build for Windows x86/x64 if: matrix.os == 'windows-latest' run: | dotnet restore TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj dotnet build TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj -c Release -f net6.0 --no-restore - - name: Build for Linux + - name: Build for Linux x86/x64 if: matrix.os == 'ubuntu-latest' run: | dotnet restore TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj dotnet build TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj -c Release -f net6.0 --no-restore + - name: Build for Linux ARM + if: matrix.os == 'ubuntu-latest' + run: | + dotnet restore TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj + dotnet build TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj -c Release -f net6.0 -a linux-arm64 --no-restore + - name: Upload Build Artifacts uses: actions/upload-artifact@v3.1.0 with: name: ${{ matrix.os }} if-no-files-found: error path: | - TodoSynchronizer.CLI/bin/Release/*.* \ No newline at end of file + TodoSynchronizer.CLI/bin/*.* From c494edcb92a8b0b52c8fd17eb116cd10e12c3a2d Mon Sep 17 00:00:00 2001 From: 1357310795 <35869804+1357310795@users.noreply.github.com> Date: Sat, 16 Sep 2023 20:08:31 +0800 Subject: [PATCH 4/6] Update cli.yml --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 1b66e76eb02..3799f029a7a 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -34,7 +34,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | dotnet restore TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj - dotnet build TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj -c Release -f net6.0 -a linux-arm64 --no-restore + dotnet build TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj -c Release -f net6.0 -a arm64 --no-restore - name: Upload Build Artifacts uses: actions/upload-artifact@v3.1.0 From c002ffc2bff4e5d0fb7cf346782d9a38e32983f5 Mon Sep 17 00:00:00 2001 From: 1357310795 <35869804+1357310795@users.noreply.github.com> Date: Sat, 16 Sep 2023 20:13:42 +0800 Subject: [PATCH 5/6] Update cli.yml --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 3799f029a7a..6c025e7060f 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -42,4 +42,4 @@ jobs: name: ${{ matrix.os }} if-no-files-found: error path: | - TodoSynchronizer.CLI/bin/*.* + TodoSynchronizer.CLI/bin From 4c586168cb2087ba82b98eb999b703e609abd749 Mon Sep 17 00:00:00 2001 From: 1357310795 <35869804+1357310795@users.noreply.github.com> Date: Sat, 16 Sep 2023 20:26:46 +0800 Subject: [PATCH 6/6] Update TodoSynchronizer.CLI.csproj --- TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj b/TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj index 27a382b4919..f59e4c1677c 100644 --- a/TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj +++ b/TodoSynchronizer.CLI/TodoSynchronizer.CLI.csproj @@ -5,6 +5,7 @@ net6.0 enable disable + win-x86;linux-x86;linux-arm64