From 70745730526d675419608dac26731e86f58fc898 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 21 Oct 2023 00:22:10 -0300 Subject: [PATCH 1/4] fix: cancel previous workflows runs for same branch --- .github/workflows/analysis-sonarcloud.yml | 16 +++++++++------- .github/workflows/build-docker.yml | 16 +++++++++------- .github/workflows/build-ubuntu.yml | 16 +++++++++------- .github/workflows/build-windows-cmake.yml | 16 +++++++++------- .github/workflows/build-windows-solution.yml | 16 +++++++++------- .github/workflows/clang-lint.yml | 9 +++++++++ .github/workflows/cron-stale.yml | 9 +++++++++ .github/workflows/pr-labeler.yml | 9 +++++++++ 8 files changed, 72 insertions(+), 35 deletions(-) diff --git a/.github/workflows/analysis-sonarcloud.yml b/.github/workflows/analysis-sonarcloud.yml index 957653a2a9a..1fea280e798 100644 --- a/.github/workflows/analysis-sonarcloud.yml +++ b/.github/workflows/analysis-sonarcloud.yml @@ -19,18 +19,20 @@ env: VCPKG_BINARY_SOURCES: clear;default,readwrite jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + sonarcloud: name: SonarCloud runs-on: ubuntu-22.04 steps: - - name: Cancel Previous Runs - if: github.ref != 'refs/heads/main' - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content' - cancel_others: true - - uses: actions/checkout@v3 if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} with: diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 16285df71f0..96b63e2424e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -14,17 +14,19 @@ on: - main jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + build_docker_x86: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} runs-on: ubuntu-latest steps: - - name: Cancel Previous Runs - if: github.ref != 'refs/heads/main' - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content' - cancel_others: true - - name: Checkout uses: actions/checkout@main with: diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index b42384c1fc5..cadf04de2f9 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -18,6 +18,15 @@ env: MAKEFLAGS: '-j 2' jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + job: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} name: ${{ matrix.os }}-${{ matrix.buildtype }} @@ -35,13 +44,6 @@ jobs: triplet: x64-linux steps: - - name: Cancel Previous Runs - if: github.ref != 'refs/heads/main' - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content' - cancel_others: true - - name: Checkout repository uses: actions/checkout@main diff --git a/.github/workflows/build-windows-cmake.yml b/.github/workflows/build-windows-cmake.yml index e834895ecb2..cc3f2e873af 100644 --- a/.github/workflows/build-windows-cmake.yml +++ b/.github/workflows/build-windows-cmake.yml @@ -15,6 +15,15 @@ env: CMAKE_BUILD_PARALLEL_LEVEL: 2 MAKEFLAGS: '-j 2' jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + job: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} name: ${{ matrix.os }}-${{ matrix.buildtype }} @@ -29,13 +38,6 @@ jobs: packages: > sccache steps: - - name: Cancel Previous Runs - if: github.ref != 'refs/heads/main' - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content' - cancel_others: true - - name: Checkout repository uses: actions/checkout@main diff --git a/.github/workflows/build-windows-solution.yml b/.github/workflows/build-windows-solution.yml index 47e2069a2ad..741e94776a0 100644 --- a/.github/workflows/build-windows-solution.yml +++ b/.github/workflows/build-windows-solution.yml @@ -18,6 +18,15 @@ env: MAKEFLAGS: '-j 2' jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + job: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} name: ${{ matrix.os }}-${{ matrix.buildtype }} @@ -32,13 +41,6 @@ jobs: packages: > sccache steps: - - name: Cancel Previous Runs - if: github.ref != 'refs/heads/main' - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content' - cancel_others: true - - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.1 diff --git a/.github/workflows/clang-lint.yml b/.github/workflows/clang-lint.yml index 070fd5ea997..c5830bb9868 100644 --- a/.github/workflows/clang-lint.yml +++ b/.github/workflows/clang-lint.yml @@ -8,6 +8,15 @@ on: paths: - 'src/**' jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + build: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/cron-stale.yml b/.github/workflows/cron-stale.yml index 57df64dae6a..4b7f409b26a 100644 --- a/.github/workflows/cron-stale.yml +++ b/.github/workflows/cron-stale.yml @@ -5,6 +5,15 @@ on: - cron: '30 1 * * *' jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + stale: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 066aaa23595..a8a2921d9e0 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -4,6 +4,15 @@ on: - pull_request_target jobs: + cancel-runs: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + triage: runs-on: ubuntu-latest steps: From ed6e66bde562f3d316b16e43c8cc21449cd60c9b Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 21 Oct 2023 00:22:59 -0300 Subject: [PATCH 2/4] fix --- .github/workflows/clang-lint.yml | 2 +- .github/workflows/pr-labeler.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-lint.yml b/.github/workflows/clang-lint.yml index c5830bb9868..ead8f6666b9 100644 --- a/.github/workflows/clang-lint.yml +++ b/.github/workflows/clang-lint.yml @@ -8,7 +8,7 @@ on: paths: - 'src/**' jobs: - cancel-runs: + cancel-runs: if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index a8a2921d9e0..c21b72ab371 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -4,7 +4,7 @@ on: - pull_request_target jobs: - cancel-runs: + cancel-runs: if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: From 32481a5c3bc09f5e3a134ac10d124b41fd634f37 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 21 Oct 2023 00:26:37 -0300 Subject: [PATCH 3/4] test workflow --- src/creatures/players/grouping/party.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/creatures/players/grouping/party.cpp b/src/creatures/players/grouping/party.cpp index b0a67a8eaf3..d5b28bb73a9 100644 --- a/src/creatures/players/grouping/party.cpp +++ b/src/creatures/players/grouping/party.cpp @@ -38,7 +38,6 @@ void Party::disband() { if (!currentLeader) { return; } - m_leader.reset(); currentLeader->setParty(nullptr); currentLeader->sendClosePrivate(CHANNEL_PARTY); From b656b7fcf1c0461e34626096d8c48909cfd25dcb Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 21 Oct 2023 00:27:55 -0300 Subject: [PATCH 4/4] Revert "test workflow" This reverts commit 32481a5c3bc09f5e3a134ac10d124b41fd634f37. --- src/creatures/players/grouping/party.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/creatures/players/grouping/party.cpp b/src/creatures/players/grouping/party.cpp index d5b28bb73a9..b0a67a8eaf3 100644 --- a/src/creatures/players/grouping/party.cpp +++ b/src/creatures/players/grouping/party.cpp @@ -38,6 +38,7 @@ void Party::disband() { if (!currentLeader) { return; } + m_leader.reset(); currentLeader->setParty(nullptr); currentLeader->sendClosePrivate(CHANNEL_PARTY);