From 26d000b9cbeaafa8a1b4d17818cf00538ab05c9e Mon Sep 17 00:00:00 2001 From: Mr_DarkBladeS <48252701+MysticalFaceLesS@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:52:29 +0300 Subject: [PATCH] Revert workflows --- .github/workflows/ci_suite.yml | 9 ++++----- .github/workflows/codeowner_reviews.yml | 25 ++++++++++++++++++++++++ .github/workflows/compile_changelogs.yml | 2 +- .github/workflows/make_changelogs.yml | 2 +- .github/workflows/round_id_linker.yml | 2 +- .github/workflows/stale.yml | 2 +- .github/workflows/tgs_test.yml | 2 +- .github/workflows/update_tgs_dmapi.yml | 2 +- 8 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/codeowner_reviews.yml diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index 915b6021e98c..47f8b1df9941 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -11,7 +11,7 @@ on: - master jobs: run_linters: - if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }} + if: "!contains(github.event.head_commit.message, '[ci skip]')" name: Run Linters runs-on: ubuntu-22.04 steps: @@ -70,7 +70,6 @@ jobs: ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1 - name: Annotate Lints - if: always() uses: yogstation13/DreamAnnotate@v2 with: outputFile: output-annotations.txt @@ -84,7 +83,7 @@ jobs: cat check_regex_output.txt compile_all_maps: - if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }} + if: "!contains(github.event.head_commit.message, '[ci skip]')" name: Compile Maps runs-on: ubuntu-latest steps: @@ -106,7 +105,7 @@ jobs: tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS -DFULL_INIT run_all_tests: - if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }} + if: "!contains(github.event.head_commit.message, '[ci skip]')" name: Integration Tests strategy: fail-fast: false @@ -136,7 +135,7 @@ jobs: # minor: ${{ matrix.minor }} test_windows: - if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }} + if: "!contains(github.event.head_commit.message, '[ci skip]')" name: Windows Build runs-on: windows-latest steps: diff --git a/.github/workflows/codeowner_reviews.yml b/.github/workflows/codeowner_reviews.yml new file mode 100644 index 000000000000..753f575f90d7 --- /dev/null +++ b/.github/workflows/codeowner_reviews.yml @@ -0,0 +1,25 @@ +name: Codeowner Reviews + +# Controls when the workflow will run +on: pull_request_target + +jobs: + assign-users: + runs-on: ubuntu-latest + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it + - uses: actions/checkout@v3 + + #Parse the Codeowner file + - name: CodeOwnersParser + id: CodeOwnersParser + uses: tgstation/CodeOwnersParser@v1 + + #Request reviews + - name: Request reviews + if: steps.CodeOwnersParser.outputs.owners != '' + uses: tgstation/RequestReviewFromUser@v1 + with: + separator: " " + users: ${{ steps.CodeOwnersParser.outputs.owners }} diff --git a/.github/workflows/compile_changelogs.yml b/.github/workflows/compile_changelogs.yml index f9118d524895..48071cb3adde 100644 --- a/.github/workflows/compile_changelogs.yml +++ b/.github/workflows/compile_changelogs.yml @@ -51,4 +51,4 @@ jobs: if: steps.value_holder.outputs.ACTIONS_ENABLED uses: ad-m/github-push-action@master with: - github_token: ${{ secrets.TOKEN || secrets.CHANGELOG_TOKEN || secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.CHANGELOG_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/make_changelogs.yml b/.github/workflows/make_changelogs.yml index c8f3666b35b3..1a30c8183e35 100644 --- a/.github/workflows/make_changelogs.yml +++ b/.github/workflows/make_changelogs.yml @@ -24,7 +24,7 @@ jobs: pip install ruamel.yaml PyGithub - name: Make CL env: - GITHUB_TOKEN: ${{ secrets.TOKEN || secrets.CHANGELOG_TOKEN || secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CHANGELOG_TOKEN || secrets.GITHUB_TOKEN }} GIT_EMAIL: "action@github.com" GIT_NAME: "Changelogs" run: python tools/changelog/generate_cl.py diff --git a/.github/workflows/round_id_linker.yml b/.github/workflows/round_id_linker.yml index 7cfd7c40ad56..3885068be756 100644 --- a/.github/workflows/round_id_linker.yml +++ b/.github/workflows/round_id_linker.yml @@ -9,5 +9,5 @@ jobs: steps: - uses: shiptest-ss13/round_linker@v2.0.0 with: - repo-token: ${{ secrets.TOKEN || secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} link-url: "https://shiptest.net/stats/rounds/" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index d813550f12d7..a19c1911c18e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/stale@v4 with: - repo-token: ${{ secrets.TOKEN || secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This PR has been inactive for a month. This means it is at risk of being auto closed in a week, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself" days-before-stale: 30 days-before-close: 7 diff --git a/.github/workflows/tgs_test.yml b/.github/workflows/tgs_test.yml index 4a061952cd26..a92b6cac76a3 100644 --- a/.github/workflows/tgs_test.yml +++ b/.github/workflows/tgs_test.yml @@ -62,4 +62,4 @@ jobs: uses: actions/checkout@v3 - name: Test TGS Integration - run: dotnet run -c Release --project tools/tgs_test ${{ github.repository }} /tgs_instances/tgstation ${{ env.TGS_API_PORT }} ${{ github.event.pull_request.head.sha || github.sha }} ${{ secrets.TOKEN || secrets.GITHUB_TOKEN }} ${{ env.PR_NUMBER }} + run: dotnet run -c Release --project tools/tgs_test ${{ github.repository }} /tgs_instances/tgstation ${{ env.TGS_API_PORT }} ${{ github.event.pull_request.head.sha || github.sha }} ${{ secrets.GITHUB_TOKEN }} ${{ env.PR_NUMBER }} diff --git a/.github/workflows/update_tgs_dmapi.yml b/.github/workflows/update_tgs_dmapi.yml index 26dd2df54108..8aa77d0d6310 100644 --- a/.github/workflows/update_tgs_dmapi.yml +++ b/.github/workflows/update_tgs_dmapi.yml @@ -42,4 +42,4 @@ jobs: pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging." pr_label: "Tools" pr_allow_empty: false - github_token: ${{ secrets.TOKEN || secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }}