mirror of
https://github.com/coder/coder.git
synced 2026-06-07 15:08:20 +00:00
e39f39ee20
Bumps the github-actions group with 2 updates: [step-security/harden-runner](https://github.com/step-security/harden-runner) and [crate-ci/typos](https://github.com/crate-ci/typos). Updates `step-security/harden-runner` from 2.10.4 to 2.11.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/step-security/harden-runner/releases">step-security/harden-runner's releases</a>.</em></p> <blockquote> <h2>v2.11.0</h2> <h2>What's Changed</h2> <p>Release v2.11.0 in <a href="https://redirect.github.com/step-security/harden-runner/issues/498">#498</a> Harden-Runner Enterprise tier now supports the use of eBPF for DNS resolution and network call monitoring</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/step-security/harden-runner/compare/v2...v2.11.0">https://github.com/step-security/harden-runner/compare/v2...v2.11.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/step-security/harden-runner/commit/4d991eb9b905ef189e4c376166672c3f2f230481"><code>4d991eb</code></a> Merge pull request <a href="https://redirect.github.com/step-security/harden-runner/issues/498">#498</a> from step-security/rc-18</li> <li><a href="https://github.com/step-security/harden-runner/commit/4ea872f89714b83576609e6f89476dfb114a6246"><code>4ea872f</code></a> Update README.md</li> <li><a href="https://github.com/step-security/harden-runner/commit/65d6f6e4ee070283fc8739e8d8295eb6c554029a"><code>65d6f6e</code></a> Add workflows</li> <li><a href="https://github.com/step-security/harden-runner/commit/1034c9a80544b55a7706ed377ea64ded8b0c7ea4"><code>1034c9a</code></a> Update package-lock.json</li> <li><a href="https://github.com/step-security/harden-runner/commit/ab221e2d7a450f54fde8ccb211cea73c5bcf1e2a"><code>ab221e2</code></a> Update agent</li> <li><a href="https://github.com/step-security/harden-runner/commit/7cb6c2fb524eafc78ce834c51af420c289690789"><code>7cb6c2f</code></a> Update agent</li> <li>See full diff in <a href="https://github.com/step-security/harden-runner/compare/cb605e52c26070c328afc4562f0b4ada7618a84e...4d991eb9b905ef189e4c376166672c3f2f230481">compare view</a></li> </ul> </details> <br /> Updates `crate-ci/typos` from 1.29.5 to 1.29.7 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/releases">crate-ci/typos's releases</a>.</em></p> <blockquote> <h2>v1.29.7</h2> <h2>[1.29.7] - 2025-02-13</h2> <h3>Fixes</h3> <ul> <li>Don't correct <code>implementors</code></li> </ul> <h2>v1.29.6</h2> <h2>[1.29.6] - 2025-02-13</h2> <h3>Features</h3> <ul> <li>Updated the dictionary with the <a href="https://redirect.github.com/crate-ci/typos/issues/1200">January 2025</a> changes</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's changelog</a>.</em></p> <blockquote> <h1>Change Log</h1> <p>All notable changes to this project will be documented in this file.</p> <p>The format is based on <a href="http://keepachangelog.com/">Keep a Changelog</a> and this project adheres to <a href="http://semver.org/">Semantic Versioning</a>.</p> <!-- raw HTML omitted --> <h2>[Unreleased] - ReleaseDate</h2> <h2>[1.29.7] - 2025-02-13</h2> <h3>Fixes</h3> <ul> <li>Don't correct <code>implementors</code></li> </ul> <h2>[1.29.6] - 2025-02-13</h2> <h3>Features</h3> <ul> <li>Updated the dictionary with the <a href="https://redirect.github.com/crate-ci/typos/issues/1200">January 2025</a> changes</li> </ul> <h2>[1.29.5] - 2025-01-30</h2> <h3>Internal</h3> <ul> <li>Update a dependency</li> </ul> <h2>[1.29.4] - 2025-01-03</h2> <h2>[1.29.3] - 2025-01-02</h2> <h2>[1.29.2] - 2025-01-02</h2> <h2>[1.29.1] - 2025-01-02</h2> <h3>Fixes</h3> <ul> <li>Don't correct <code>deriver</code></li> </ul> <h2>[1.29.0] - 2024-12-31</h2> <h3>Features</h3> <ul> <li>Updated the dictionary with the <a href="https://redirect.github.com/crate-ci/typos/issues/1156">December 2024</a> changes</li> </ul> <h3>Performance</h3> <ul> <li>Sped up dictionary lookups</li> </ul> <h2>[1.28.4] - 2024-12-16</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/crate-ci/typos/commit/51f257b946f503b768e522781f56e9b7b5570d48"><code>51f257b</code></a> chore: Release</li> <li><a href="https://github.com/crate-ci/typos/commit/26abf5bab7c077003c530d632ba2d194dcb50eaf"><code>26abf5b</code></a> docs: Update changelog</li> <li><a href="https://github.com/crate-ci/typos/commit/70356ad394aed5f2198728ae716d07306284545d"><code>70356ad</code></a> Merge pull request <a href="https://redirect.github.com/crate-ci/typos/issues/1229">#1229</a> from epage/english</li> <li><a href="https://github.com/crate-ci/typos/commit/1121a62d94115d9a7196fbfd6920b2690cbb427f"><code>1121a62</code></a> fix(dict): Don't correct implementors</li> <li><a href="https://github.com/crate-ci/typos/commit/991878ee7836dc567b3478ec87191e3bd2e3db73"><code>991878e</code></a> chore: Release</li> <li><a href="https://github.com/crate-ci/typos/commit/c89d673ca19e503777d7d71b76908d4dab2b5138"><code>c89d673</code></a> chore(ci): Update builder image</li> <li><a href="https://github.com/crate-ci/typos/commit/0fad3ddc6e0fedf679217dcc61886fbeabd09346"><code>0fad3dd</code></a> chore(deps): Update compatible (<a href="https://redirect.github.com/crate-ci/typos/issues/1223">#1223</a>)</li> <li><a href="https://github.com/crate-ci/typos/commit/b65799a5c4a8931f965b1d7cbabca95913c2ab0a"><code>b65799a</code></a> chore: Release</li> <li><a href="https://github.com/crate-ci/typos/commit/2c0968908d0d79fa0acaa67f017f9b539fab24c5"><code>2c09689</code></a> docs: Update changelog</li> <li><a href="https://github.com/crate-ci/typos/commit/4af6a01f528aaca60cc5571e741ce05eb2d3f267"><code>4af6a01</code></a> Merge pull request <a href="https://redirect.github.com/crate-ci/typos/issues/1222">#1222</a> from epage/jan</li> <li>Additional commits viewable in <a href="https://github.com/crate-ci/typos/compare/11ca4583f2f3f74c7e7785c0ecb20fe2c99a4308...51f257b946f503b768e522781f56e9b7b5570d48">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
142 lines
5.2 KiB
YAML
142 lines
5.2 KiB
YAML
name: Stale Issue, Branch and Old Workflows Cleanup
|
|
on:
|
|
schedule:
|
|
# Every day at midnight
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
issues:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# Needed to close issues.
|
|
issues: write
|
|
# Needed to close PRs.
|
|
pull-requests: write
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: stale
|
|
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
|
|
with:
|
|
stale-issue-label: "stale"
|
|
stale-pr-label: "stale"
|
|
# days-before-stale: 180
|
|
# essentially disabled for now while we work through polish issues
|
|
days-before-stale: 3650
|
|
|
|
# Pull Requests become stale more quickly due to merge conflicts.
|
|
# Also, we promote minimizing WIP.
|
|
days-before-pr-stale: 7
|
|
days-before-pr-close: 3
|
|
# We rarely take action in response to the message, so avoid
|
|
# cluttering the issue and just close the oldies.
|
|
stale-pr-message: ""
|
|
stale-issue-message: ""
|
|
# Upped from 30 since we have a big tracker and was hitting the limit.
|
|
operations-per-run: 60
|
|
# Start with the oldest issues, always.
|
|
ascending: true
|
|
- name: "Close old issues labeled likely-no"
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const thirtyDaysAgo = new Date(new Date().setDate(new Date().getDate() - 30));
|
|
console.log(`Looking for issues labeled with 'likely-no' more than 30 days ago, which is after ${thirtyDaysAgo.toISOString()}`);
|
|
|
|
const issues = await github.rest.issues.listForRepo({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: 'likely-no',
|
|
state: 'open',
|
|
});
|
|
|
|
console.log(`Found ${issues.data.length} open issues labeled with 'likely-no'`);
|
|
|
|
for (const issue of issues.data) {
|
|
console.log(`Checking issue #${issue.number} created at ${issue.created_at}`);
|
|
|
|
const timeline = await github.rest.issues.listEventsForTimeline({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: issue.number,
|
|
});
|
|
|
|
const labelEvent = timeline.data.find(event => event.event === 'labeled' && event.label.name === 'likely-no');
|
|
|
|
if (labelEvent) {
|
|
console.log(`Issue #${issue.number} was labeled with 'likely-no' at ${labelEvent.created_at}`);
|
|
|
|
if (new Date(labelEvent.created_at) < thirtyDaysAgo) {
|
|
console.log(`Issue #${issue.number} is older than 30 days with 'likely-no' label, closing issue.`);
|
|
await github.rest.issues.update({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: issue.number,
|
|
state: 'closed',
|
|
state_reason: 'not_planned'
|
|
});
|
|
}
|
|
} else {
|
|
console.log(`Issue #${issue.number} does not have a 'likely-no' label event in its timeline.`);
|
|
}
|
|
}
|
|
|
|
branches:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# Needed to delete branches.
|
|
contents: write
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Run delete-old-branches-action
|
|
uses: beatlabs/delete-old-branches-action@6e94df089372a619c01ae2c2f666bf474f890911 # v0.0.10
|
|
with:
|
|
repo_token: ${{ github.token }}
|
|
date: "6 months ago"
|
|
dry_run: false
|
|
delete_tags: false
|
|
# extra_protected_branch_regex: ^(foo|bar)$
|
|
exclude_open_pr_branches: true
|
|
del_runs:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# Needed to delete workflow runs.
|
|
actions: write
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Delete PR Cleanup workflow runs
|
|
uses: Mattraks/delete-workflow-runs@39f0bbed25d76b34de5594dceab824811479e5de # v2.0.6
|
|
with:
|
|
token: ${{ github.token }}
|
|
repository: ${{ github.repository }}
|
|
retain_days: 30
|
|
keep_minimum_runs: 30
|
|
delete_workflow_pattern: pr-cleanup.yaml
|
|
|
|
- name: Delete PR Deploy workflow skipped runs
|
|
uses: Mattraks/delete-workflow-runs@39f0bbed25d76b34de5594dceab824811479e5de # v2.0.6
|
|
with:
|
|
token: ${{ github.token }}
|
|
repository: ${{ github.repository }}
|
|
retain_days: 30
|
|
keep_minimum_runs: 30
|
|
delete_workflow_pattern: pr-deploy.yaml
|