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
37 changes: 37 additions & 0 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- id: createGithubAppToken
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.OPERATOR_APP_ID }}
private-key: ${{ secrets.OPERATOR_PRIVATE_KEY }}
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.createGithubAppToken.outputs.token }}
- env:
BASE_REF: ${{ github.base_ref }}
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
HEAD_REF: ${{ github.head_ref }}
REPO: ${{ github.repository }}
if: "!contains(github.event.pull_request.labels.*.name, 'ghstack')"
run: git push origin --delete "$HEAD_REF"
- env:
BASE_REF: ${{ github.base_ref }}
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
HEAD_REF: ${{ github.head_ref }}
REPO: ${{ github.repository }}
if: contains(github.event.pull_request.labels.*.name, 'ghstack')
run:
"for role in base head orig; do\n git push origin --delete \"${HEAD_REF%/head}/$role\"\
\ || true\ndone\n"
name: Cleanup
"on":
check_suite:
types:
- completed
pull_request:
types:
- closed
88 changes: 88 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
jobs:
check:
needs:
- triage
runs-on: ubuntu-latest
steps:
- id: createGithubAppToken
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.OPERATOR_APP_ID }}
private-key: ${{ secrets.OPERATOR_PRIVATE_KEY }}
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.createGithubAppToken.outputs.token }}
- uses: shikanime-studio/setup-nix-action@v1
with:
github-token: ${{ steps.createGithubAppToken.outputs.token }}
- uses: shikanime-studio/direnv-action@v2
- run: nix flake check --accept-flake-config --all-systems --no-pure-eval
merge:
needs:
- check
runs-on: ubuntu-latest
steps:
- id: createGithubAppToken
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.OPERATOR_APP_ID }}
private-key: ${{ secrets.OPERATOR_PRIVATE_KEY }}
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.createGithubAppToken.outputs.token }}
- uses: shikanime-studio/setup-nix-action@v1
with:
github-token: ${{ steps.createGithubAppToken.outputs.token }}
- env:
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
PR_HTML_URL: ${{ github.event.issue.pull_request.html_url }}
if:
contains(github.event.pull_request.labels.*.name, 'dependencies') && contains(github.event.issue.labels.*.name,
'ghstack')
run: nix run nixpkgs#sapling -- ghstack land "$PR_HTML_URL"
- env:
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
PR_HTML_URL: ${{ github.event.issue.pull_request.html_url }}
if:
contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.issue.labels.*.name,
'ghstack')
run: gh pr merge --auto "$PR_HTML_URL"
triage:
runs-on: ubuntu-latest
steps:
- id: createGithubAppToken
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.OPERATOR_APP_ID }}
private-key: ${{ secrets.OPERATOR_PRIVATE_KEY }}
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.createGithubAppToken.outputs.token }}
- env:
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
if:
github.event.pull_request.user.login == 'yorha-operator-6o[bot]' || github.event.pull_request.user.login
== 'dependabot[bot]'
run: gh pr edit "$PR_NUMBER" --assignee @yorha-operator-6o
- env:
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
if:
github.event.pull_request.user.login == 'yorha-operator-6o[bot]' || github.event.pull_request.user.login
== 'dependabot[bot]'
run: gh pr edit "$PR_NUMBER" --add-label dependencies
- env:
GITHUB_TOKEN: ${{ steps.createGithubAppToken.outputs.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
if: startsWith(github.head_ref, 'gh/') && endsWith(github.head_ref, '/head')
run: gh pr edit "$PR_NUMBER" --add-label ghstack
name: Integration
"on":
pull_request:
branches:
- main
- gh/*/*/base
6 changes: 1 addition & 5 deletions .github/workflows/main.yaml → .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ jobs:
github-token: ${{ steps.createGithubAppToken.outputs.token }}
- uses: shikanime-studio/direnv-action@v2
- run: nix flake check --accept-flake-config --all-systems --no-pure-eval
name: Main
name: Push
"on":
pull_request:
branches:
- main
- gh/*/*/base
push:
branches:
- main
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/triage.yaml

This file was deleted.

Loading