Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/composite/build-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Set up pnpm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Set up OpenJDK 25
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/notion-checks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Run script
Expand Down
4 changes: 3 additions & 1 deletion .github/composite/pr-description-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true

- name: Run script
id: run_script
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/redeploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}
HEADSCALE_ADDRESS: ${{ inputs.HEADSCALE_ADDRESS }}
HEADSCALE_USER: ${{ inputs.HEADSCALE_USER }}
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/redeploy/internal/standup-bot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Expose GitHub Runtime
Expand Down
36 changes: 0 additions & 36 deletions .github/composite/setup-ci/action.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/composite/test/backend-pre-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true

- name: Set up OpenJDK 25
uses: actions/setup-java@v5
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/test/backend-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Set up pnpm
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/test/frontend-pre-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Set up OpenJDK 25
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/test/frontend-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}

- name: Set up pnpm
Expand Down
3 changes: 2 additions & 1 deletion .github/composite/validate-db/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ runs:
using: "composite"
steps:
- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ inputs.SECRETS }}
HEADSCALE_ADDRESS: ${{ inputs.HEADSCALE_ADDRESS }}
HEADSCALE_USER: ${{ inputs.HEADSCALE_USER }}
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 1 addition & 39 deletions .github/scripts/load-slash-commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,3 @@
import { COMMANDS } from "load-slash-commands/commands";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";

const { getGhaOutput, githubOutput: githubOutputFile } = await yargs(
hideBin(process.argv),
)
.option("getGhaOutput", {
type: "boolean",
describe: "Enable GitHub Actions output",
default: false,
})
.option("githubOutput", {
type: "string",
describe: "Path to GITHUB_OUTPUT",
default: process.env.GITHUB_OUTPUT,
})
.strict()
.parse();

async function main() {
const cmds = COMMANDS.filter((c) => c.length > 0).join("\n");

if (getGhaOutput && githubOutputFile) {
console.log("Outputting cmds context...");
const w = Bun.file(githubOutputFile).writer();
await w.write(`commands<<EOF\n${cmds}\nEOF\n`);
await w.flush();
await w.end();
} else if (getGhaOutput && !githubOutputFile) {
throw new Error("GITHUB_OUTPUT or github-output arg is not supplied.");
}
}

main()
.then(() => {
process.exit();
})
.catch(() => {
process.exit(1);
});
console.log(COMMANDS.join("\n"));
2 changes: 1 addition & 1 deletion .github/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@digitalocean/dots": "^1.7.0",
"@notionhq/client": "^5.7.0",
"@octokit/rest": "^22.0.1",
"@tahminator/pipeline": "^1.0.76",
"@tahminator/pipeline": "1.0.90",
"@types/yargs": "^17.0.35",
"bun": "^1.3.6",
"coolify": "https://github.com/tahminator/Coolify-TypeScript-SDK#8e19e18635ea2b095a9c39c574d22eefd938441f",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ai-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ jobs:
ref: ${{ needs.getPRHead.outputs.sha }}

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}

- name: Load secrets
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ jobs:
ref: ${{ needs.getPRHead.outputs.sha }}

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}

- name: Load secrets
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ jobs:
uses: actions/checkout@v6

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}

- name: Set up pnpm
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/copy-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ jobs:
ref: ${{ needs.getPRHead.outputs.sha }}

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}
HEADSCALE_ADDRESS: ${{ secrets.HEADSCALE_ADDRESS }}
HEADSCALE_USER: ${{ secrets.HEADSCALE_USER }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
uses: actions/checkout@v6

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}

- name: Set up pnpm
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
uses: actions/checkout@v6

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}

- name: Run script
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/migrate-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ jobs:
fetch-depth: 0

- name: Setup CI
uses: ./.github/composite/setup-ci
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
LINT_CI: true
SECRETS: ${{ toJSON(secrets) }}
HEADSCALE_ADDRESS: ${{ secrets.HEADSCALE_ADDRESS }}
HEADSCALE_USER: ${{ secrets.HEADSCALE_USER }}
Expand Down
73 changes: 15 additions & 58 deletions .github/workflows/slash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,31 @@ on:
types: [created]

permissions:
contents: write
issues: write
pull-requests: write
contents: read

jobs:
slashCommandDispatch:
if: >-
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/')
runs-on: ubuntu-latest

steps:
- name: Get PR head SHA
id: pr-head
uses: actions/github-script@v8
with:
result-encoding: string
script: |
const prId = ${{ github.event.issue.number }};
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: parseInt(prId, 10)
});
return pr.head.sha;

- name: Get branch
id: branch
uses: actions/github-script@v8
with:
result-encoding: string
script: |
const prId = ${{ github.event.issue.number }};
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: parseInt(prId, 10)
});
return pr.head.ref;

- name: Checkout Repository
uses: actions/checkout@v6
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.pr-head.outputs.result }}

- name: Setup CI
uses: ./.github/composite/setup-ci
with:
SECRETS: ${{ toJSON(secrets) }}

- name: Run script
run: bun run .github/scripts/load-slash-commands --get-gha-output=true
id: cmds
# stay on trusted default-branch code until the commands action authorizes the commenter
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false

- name: Create GitHub App Token
uses: actions/create-github-app-token@v3
id: app-token
- name: Setup pipeline
uses: tahminator/pipeline/actions/setup@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
app-id: ${{ secrets._GITHUB_APP_APP_ID }}
private-key: ${{ secrets._GITHUB_APP_PEM_CONTENT }}
LINT_CI: true

- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v4
uses: tahminator/pipeline/actions/commands@ff36293f28519b2b90d7e28918a6885d9baf019e # 1.0.90
with:
dispatch-type: workflow
token: ${{ steps.app-token.outputs.token }}
commands: |
${{ steps.cmds.outputs.commands }}
static-args: |
repository=${{ github.repository }}
comment-id=${{ github.event.comment.id }}
prId=${{ github.event.issue.number }}
author=${{ github.actor }}
ref=${{ steps.branch.outputs.result }}
APP_ID: ${{ secrets._GITHUB_APP_APP_ID }}
PRIVATE_KEY: ${{ secrets._GITHUB_APP_PEM_CONTENT }}
DYNAMIC_COMMANDS_BUN_SCRIPT: .github/scripts/load-slash-commands/index.ts
Loading