mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Sets prettier to run on the repo (#91379)
## About The Pull Request Prettier (an auto formatter) is set to only run within the tgui folder currently. This removes that limitation, allowing it to automatically format all supported files in the repo (.js, .html, .yml [etc](https://prettier.io/docs/)) I made a few exceptions for bundled and generated files ## Why It's Good For The Game I'm of the opinion that code should look uniform and am lazy enough to want CTRL-S to format files without having to think beyond that ## Changelog
This commit is contained in:
@@ -13,24 +13,24 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.merged == true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate App Token
|
||||
id: app-token-generation
|
||||
uses: actions/create-github-app-token@v2
|
||||
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
env:
|
||||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
APP_ID: ${{ secrets.APP_ID }}
|
||||
- name: Generate App Token
|
||||
id: app-token-generation
|
||||
uses: actions/create-github-app-token@v2
|
||||
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
env:
|
||||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
APP_ID: ${{ secrets.APP_ID }}
|
||||
|
||||
- name: Run auto changelog
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { processAutoChangelog } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoChangelog.js')
|
||||
await processAutoChangelog({ github, context })
|
||||
github-token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
|
||||
- name: Run auto changelog
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { processAutoChangelog } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoChangelog.js')
|
||||
await processAutoChangelog({ github, context })
|
||||
github-token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Autowiki
|
||||
on:
|
||||
schedule:
|
||||
- cron: "5 4 * * *"
|
||||
- cron: "5 4 * * *"
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -10,36 +10,36 @@ jobs:
|
||||
autowiki:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Check for AUTOWIKI_USERNAME"
|
||||
id: secrets_set
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.AUTOWIKI_USERNAME }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
- name: Install BYOND
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
uses: ./.github/actions/restore_or_install_byond
|
||||
- name: Install rust-g
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
run: |
|
||||
bash tools/ci/install_rust_g.sh
|
||||
- name: Compile and generate Autowiki files
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
run: |
|
||||
source $HOME/BYOND/byond/bin/byondsetup
|
||||
tools/build/build --ci autowiki
|
||||
- name: Run Autowiki
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
env:
|
||||
USERNAME: ${{ secrets.AUTOWIKI_USERNAME }}
|
||||
PASSWORD: ${{ secrets.AUTOWIKI_PASSWORD }}
|
||||
run: |
|
||||
cd tools/autowiki
|
||||
npm install
|
||||
cd ../..
|
||||
node tools/autowiki/autowiki.js data/autowiki_edits.txt data/autowiki_files/
|
||||
- name: "Check for AUTOWIKI_USERNAME"
|
||||
id: secrets_set
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.AUTOWIKI_USERNAME }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
- name: Install BYOND
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
uses: ./.github/actions/restore_or_install_byond
|
||||
- name: Install rust-g
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
run: |
|
||||
bash tools/ci/install_rust_g.sh
|
||||
- name: Compile and generate Autowiki files
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
run: |
|
||||
source $HOME/BYOND/byond/bin/byondsetup
|
||||
tools/build/build --ci autowiki
|
||||
- name: Run Autowiki
|
||||
if: steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
env:
|
||||
USERNAME: ${{ secrets.AUTOWIKI_USERNAME }}
|
||||
PASSWORD: ${{ secrets.AUTOWIKI_PASSWORD }}
|
||||
run: |
|
||||
cd tools/autowiki
|
||||
npm install
|
||||
cd ../..
|
||||
node tools/autowiki/autowiki.js data/autowiki_edits.txt data/autowiki_files/
|
||||
|
||||
@@ -3,11 +3,11 @@ name: CI Suite
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- 'project/**'
|
||||
- master
|
||||
- "project/**"
|
||||
merge_group:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -65,14 +65,21 @@ jobs:
|
||||
|
||||
compare_screenshots:
|
||||
if: needs.collect_data.outputs.alternate_tests == '[]' || needs.run_alternate_tests.result == 'success'
|
||||
needs: [ collect_data, run_all_tests, run_alternate_tests ]
|
||||
needs: [collect_data, run_all_tests, run_alternate_tests]
|
||||
name: Compare Screenshot Tests
|
||||
uses: ./.github/workflows/compare_screenshots.yml
|
||||
|
||||
completion_gate: # Serves as a non-moving target for branch rulesets
|
||||
if: always() && !cancelled()
|
||||
name: Completion Gate
|
||||
needs: [ compare_screenshots, compile_all_maps, run_all_tests, run_alternate_tests, run_linters ]
|
||||
needs:
|
||||
[
|
||||
compare_screenshots,
|
||||
compile_all_maps,
|
||||
run_all_tests,
|
||||
run_alternate_tests,
|
||||
run_linters,
|
||||
]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Decide whether the needed jobs succeeded or failed
|
||||
|
||||
@@ -7,7 +7,6 @@ on:
|
||||
|
||||
jobs:
|
||||
assign-users:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
|
||||
@@ -26,5 +25,5 @@ jobs:
|
||||
if: steps.CodeOwnersParser.outputs.owners != ''
|
||||
uses: tgstation/RequestReviewFromUser@v1
|
||||
with:
|
||||
separator: ' '
|
||||
separator: " "
|
||||
users: ${{ steps.CodeOwnersParser.outputs.owners }}
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Compile changelogs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: "3.x"
|
||||
|
||||
- name: "Install deps"
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: 'New PR Notification'
|
||||
name: "New PR Notification"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, closed]
|
||||
|
||||
+49
-49
@@ -11,56 +11,56 @@ jobs:
|
||||
pull-requests: write # to apply labels
|
||||
issues: write # to apply labels
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Run Auto Labeler
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { get_updated_label_set } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoLabel.js');
|
||||
const new_labels = await get_updated_label_set({ github, context });
|
||||
github.rest.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: new_labels,
|
||||
});
|
||||
console.log(`Labels updated: ${new_labels}`);
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Run Auto Labeler
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { get_updated_label_set } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoLabel.js');
|
||||
const new_labels = await get_updated_label_set({ github, context });
|
||||
github.rest.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: new_labels,
|
||||
});
|
||||
console.log(`Labels updated: ${new_labels}`);
|
||||
gbp:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.action == 'opened' || github.event.action == 'closed'
|
||||
steps:
|
||||
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
|
||||
id: value_holder
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup git
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: |
|
||||
git config --global user.name "gbp-action"
|
||||
git config --global user.email "<>"
|
||||
- name: Checkout alternate branch
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "gbp-balances" # The branch name
|
||||
path: gbp-balances
|
||||
# This is to ensure we keep the gbp.toml from master
|
||||
# without having to update our separate branch.
|
||||
- name: Copy configuration
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml
|
||||
- name: GBP action
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: tgstation/gbp-action@master
|
||||
with:
|
||||
branch: "gbp-balances"
|
||||
directory: ./gbp-balances
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
|
||||
id: value_holder
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup git
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: |
|
||||
git config --global user.name "gbp-action"
|
||||
git config --global user.email "<>"
|
||||
- name: Checkout alternate branch
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "gbp-balances" # The branch name
|
||||
path: gbp-balances
|
||||
# This is to ensure we keep the gbp.toml from master
|
||||
# without having to update our separate branch.
|
||||
- name: Copy configuration
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml
|
||||
- name: GBP action
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: tgstation/gbp-action@master
|
||||
with:
|
||||
branch: "gbp-balances"
|
||||
directory: ./gbp-balances
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,43 +2,43 @@ name: GBP Collection
|
||||
# Every hour at the :20 minute mark. GitHub tells us to pick odd hours, instead of just using the start.
|
||||
on:
|
||||
schedule:
|
||||
- cron: "20 * * * *"
|
||||
- cron: "20 * * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
gbp_collection:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
|
||||
id: value_holder
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup git
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- name: Checkout alternate branch
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "gbp-balances" # The branch name
|
||||
path: gbp-balances
|
||||
# This is to ensure we keep the gbp.toml from master
|
||||
# without having to update our separate branch.
|
||||
- name: Copy configuration
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml
|
||||
- name: GBP action
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: tgstation/gbp-action@master
|
||||
with:
|
||||
collect: "true"
|
||||
directory: ./gbp-balances
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
|
||||
id: value_holder
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup git
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- name: Checkout alternate branch
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "gbp-balances" # The branch name
|
||||
path: gbp-balances
|
||||
# This is to ensure we keep the gbp.toml from master
|
||||
# without having to update our separate branch.
|
||||
- name: Copy configuration
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml
|
||||
- name: GBP action
|
||||
if: steps.value_holder.outputs.ACTIONS_ENABLED
|
||||
uses: tgstation/gbp-action@master
|
||||
with:
|
||||
collect: "true"
|
||||
directory: ./gbp-balances
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
name: Generate documentation
|
||||
on:
|
||||
schedule:
|
||||
- cron: "44 */6 * * *"
|
||||
- cron: "44 */6 * * *"
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
generate_documentation:
|
||||
permissions:
|
||||
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
|
||||
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
|
||||
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
|
||||
runs-on: ubuntu-22.04
|
||||
concurrency: gen-docs
|
||||
|
||||
@@ -8,11 +8,11 @@ jobs:
|
||||
remove_guide_comments:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Remove guide comments
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { removeGuideComments } = await import('${{ github.workspace }}/tools/pull_request_hooks/removeGuideComments.js')
|
||||
await removeGuideComments({ github, context })
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Remove guide comments
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { removeGuideComments } = await import('${{ github.workspace }}/tools/pull_request_hooks/removeGuideComments.js')
|
||||
await removeGuideComments({ github, context })
|
||||
|
||||
@@ -3,29 +3,29 @@ on:
|
||||
workflow_run:
|
||||
workflows: [CI Suite]
|
||||
types:
|
||||
- completed
|
||||
- completed
|
||||
jobs:
|
||||
rerun_flaky_tests:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Rerun flaky tests
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
|
||||
await rerunFlakyTests({ github, context })
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Rerun flaky tests
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
|
||||
await rerunFlakyTests({ github, context })
|
||||
report_flaky_tests:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.run_attempt == 2 }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Report flaky tests
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
|
||||
await reportFlakyTests({ github, context })
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Report flaky tests
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
|
||||
await reportFlakyTests({ github, context })
|
||||
|
||||
@@ -7,6 +7,6 @@ jobs:
|
||||
link_rounds:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: tgstation/round_linker@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: tgstation/round_linker@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+15
-16
@@ -2,29 +2,28 @@ name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: "This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, 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: 7
|
||||
days-before-close: 7
|
||||
stale-pr-label: 'Stale'
|
||||
days-before-issue-stale: -1
|
||||
stale-issue-label: 'Cleanup Flagged'
|
||||
remove-issue-stale-when-updated: false
|
||||
exempt-pr-labels: 'RED LABEL,Good First PR'
|
||||
operations-per-run: 300
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: "This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, 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: 7
|
||||
days-before-close: 7
|
||||
stale-pr-label: "Stale"
|
||||
days-before-issue-stale: -1
|
||||
stale-issue-label: "Cleanup Flagged"
|
||||
remove-issue-stale-when-updated: false
|
||||
exempt-pr-labels: "RED LABEL,Good First PR"
|
||||
operations-per-run: 300
|
||||
|
||||
@@ -6,36 +6,36 @@
|
||||
name: Test Merge Detector
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/30 * * * *"
|
||||
- cron: "*/30 * * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
test_merge_bot:
|
||||
name: Test Merge Detector
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check for GET_TEST_MERGES_URL
|
||||
id: secrets_set
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.GET_TEST_MERGES_URL }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "GET_TEST_MERGES_URL=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
|
||||
uses: actions/checkout@v4
|
||||
- name: Prepare module
|
||||
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
|
||||
run: |
|
||||
# This is needed because node-fetch needs import and doesn't work with require :/
|
||||
echo "{\"type\": \"module\"}" > package.json
|
||||
npm install node-fetch
|
||||
- name: Check for test merges
|
||||
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
GET_TEST_MERGES_URL: ${{ secrets.GET_TEST_MERGES_URL }}
|
||||
with:
|
||||
script: |
|
||||
const { processTestMerges } = await import('${{ github.workspace }}/tools/test_merge_bot/main.js')
|
||||
await processTestMerges({ github, context })
|
||||
name: Test Merge Detector
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check for GET_TEST_MERGES_URL
|
||||
id: secrets_set
|
||||
env:
|
||||
ENABLER_SECRET: ${{ secrets.GET_TEST_MERGES_URL }}
|
||||
run: |
|
||||
unset SECRET_EXISTS
|
||||
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
|
||||
echo "GET_TEST_MERGES_URL=$SECRET_EXISTS" >> $GITHUB_OUTPUT
|
||||
- name: Checkout
|
||||
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
|
||||
uses: actions/checkout@v4
|
||||
- name: Prepare module
|
||||
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
|
||||
run: |
|
||||
# This is needed because node-fetch needs import and doesn't work with require :/
|
||||
echo "{\"type\": \"module\"}" > package.json
|
||||
npm install node-fetch
|
||||
- name: Check for test merges
|
||||
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
GET_TEST_MERGES_URL: ${{ secrets.GET_TEST_MERGES_URL }}
|
||||
with:
|
||||
script: |
|
||||
const { processTestMerges } = await import('${{ github.workspace }}/tools/test_merge_bot/main.js')
|
||||
await processTestMerges({ github, context })
|
||||
|
||||
@@ -2,39 +2,39 @@ name: TGS Test Suite
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'project/**'
|
||||
- 'gh-readonly-queue/master/**'
|
||||
- 'gh-readonly-queue/project/**'
|
||||
- master
|
||||
- "project/**"
|
||||
- "gh-readonly-queue/master/**"
|
||||
- "gh-readonly-queue/project/**"
|
||||
paths:
|
||||
- '.tgs.yml'
|
||||
- '.github/workflows/tgs_test.yml'
|
||||
- 'dependencies.sh'
|
||||
- 'code/__DEFINES/tgs.config.dm'
|
||||
- 'code/__DEFINES/tgs.dm'
|
||||
- 'code/game/world.dm'
|
||||
- 'code/modules/tgs/**'
|
||||
- 'tools/bootstrap/**'
|
||||
- 'tools/tgs_scripts/**'
|
||||
- 'tools/tgs_test/**'
|
||||
- ".tgs.yml"
|
||||
- ".github/workflows/tgs_test.yml"
|
||||
- "dependencies.sh"
|
||||
- "code/__DEFINES/tgs.config.dm"
|
||||
- "code/__DEFINES/tgs.dm"
|
||||
- "code/game/world.dm"
|
||||
- "code/modules/tgs/**"
|
||||
- "tools/bootstrap/**"
|
||||
- "tools/tgs_scripts/**"
|
||||
- "tools/tgs_test/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- 'project/**'
|
||||
- master
|
||||
- "project/**"
|
||||
paths:
|
||||
- '.tgs.yml'
|
||||
- '.github/workflows/tgs_test.yml'
|
||||
- 'dependencies.sh'
|
||||
- 'code/__DEFINES/tgs.config.dm'
|
||||
- 'code/__DEFINES/tgs.dm'
|
||||
- 'code/game/world.dm'
|
||||
- 'code/modules/tgs/**'
|
||||
- 'tools/bootstrap/**'
|
||||
- 'tools/tgs_scripts/**'
|
||||
- 'tools/tgs_test/**'
|
||||
- ".tgs.yml"
|
||||
- ".github/workflows/tgs_test.yml"
|
||||
- "dependencies.sh"
|
||||
- "code/__DEFINES/tgs.config.dm"
|
||||
- "code/__DEFINES/tgs.dm"
|
||||
- "code/game/world.dm"
|
||||
- "code/modules/tgs/**"
|
||||
- "tools/bootstrap/**"
|
||||
- "tools/tgs_scripts/**"
|
||||
- "tools/tgs_test/**"
|
||||
merge_group:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
env:
|
||||
TGS_API_PORT: 5000
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
|
||||
@@ -13,50 +13,50 @@ jobs:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Branch
|
||||
run: |
|
||||
git branch -f tgs-dmapi-update
|
||||
git checkout tgs-dmapi-update
|
||||
git reset --hard master
|
||||
- name: Branch
|
||||
run: |
|
||||
git branch -f tgs-dmapi-update
|
||||
git checkout tgs-dmapi-update
|
||||
git reset --hard master
|
||||
|
||||
- name: Apply DMAPI update
|
||||
uses: tgstation/tgs-dmapi-updater@v2
|
||||
id: dmapi-update
|
||||
with:
|
||||
header-path: 'code/__DEFINES/tgs.dm'
|
||||
library-path: 'code/modules/tgs'
|
||||
- name: Apply DMAPI update
|
||||
uses: tgstation/tgs-dmapi-updater@v2
|
||||
id: dmapi-update
|
||||
with:
|
||||
header-path: "code/__DEFINES/tgs.dm"
|
||||
library-path: "code/modules/tgs"
|
||||
|
||||
- name: Commit and Push
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git config user.name "tgstation-ci[bot]"
|
||||
git config user.email "179393467+tgstation-ci[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m 'Update TGS DMAPI'
|
||||
git push -f -u origin tgs-dmapi-update
|
||||
- name: Commit and Push
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git config user.name "tgstation-ci[bot]"
|
||||
git config user.email "179393467+tgstation-ci[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m 'Update TGS DMAPI'
|
||||
git push -f -u origin tgs-dmapi-update
|
||||
|
||||
- name: Generate App Token
|
||||
id: app-token-generation
|
||||
uses: actions/create-github-app-token@v2
|
||||
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
env:
|
||||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
APP_ID: ${{ secrets.APP_ID }}
|
||||
- name: Generate App Token
|
||||
id: app-token-generation
|
||||
uses: actions/create-github-app-token@v2
|
||||
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
env:
|
||||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
APP_ID: ${{ secrets.APP_ID }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: repo-sync/pull-request@v2
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
source_branch: "tgs-dmapi-update"
|
||||
destination_branch: "master"
|
||||
pr_title: "Automatic TGS DMAPI Update"
|
||||
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging.\n\n${{ steps.dmapi-update.outputs.release-notes }}"
|
||||
pr_label: "Tools"
|
||||
pr_allow_empty: false
|
||||
github_token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
|
||||
- name: Create Pull Request
|
||||
uses: repo-sync/pull-request@v2
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
source_branch: "tgs-dmapi-update"
|
||||
destination_branch: "master"
|
||||
pr_title: "Automatic TGS DMAPI Update"
|
||||
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging.\n\n${{ steps.dmapi-update.outputs.release-notes }}"
|
||||
pr_label: "Tools"
|
||||
pr_allow_empty: false
|
||||
github_token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user