mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-26 10:02:42 +00:00
@@ -2,7 +2,7 @@ name: Docker image builds (pull requests)
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_METADATA_SET_OUTPUT_ENV: "true"
|
DOCKER_METADATA_SET_OUTPUT_ENV: "true"
|
||||||
@@ -45,6 +45,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
brew bundle
|
brew bundle
|
||||||
|
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 # v1.15.1
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
brew bundle
|
brew bundle
|
||||||
|
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 # v1.15.1
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
||||||
with:
|
with:
|
||||||
|
|||||||
+66
-64
@@ -2,9 +2,9 @@ name: Go
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -15,77 +15,79 @@ jobs:
|
|||||||
#runs-on: alrest-techarohq
|
#runs-on: alrest-techarohq
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: build essential
|
- name: build essential
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y build-essential
|
sudo apt-get install -y build-essential
|
||||||
|
|
||||||
- name: Set up Homebrew
|
- name: Set up Homebrew
|
||||||
uses: Homebrew/actions/setup-homebrew@main
|
uses: Homebrew/actions/setup-homebrew@main
|
||||||
|
|
||||||
- name: Setup Homebrew cellar cache
|
- name: Setup Homebrew cellar cache
|
||||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
/home/linuxbrew/.linuxbrew/Cellar
|
/home/linuxbrew/.linuxbrew/Cellar
|
||||||
/home/linuxbrew/.linuxbrew/bin
|
/home/linuxbrew/.linuxbrew/bin
|
||||||
/home/linuxbrew/.linuxbrew/etc
|
/home/linuxbrew/.linuxbrew/etc
|
||||||
/home/linuxbrew/.linuxbrew/include
|
/home/linuxbrew/.linuxbrew/include
|
||||||
/home/linuxbrew/.linuxbrew/lib
|
/home/linuxbrew/.linuxbrew/lib
|
||||||
/home/linuxbrew/.linuxbrew/opt
|
/home/linuxbrew/.linuxbrew/opt
|
||||||
/home/linuxbrew/.linuxbrew/sbin
|
/home/linuxbrew/.linuxbrew/sbin
|
||||||
/home/linuxbrew/.linuxbrew/share
|
/home/linuxbrew/.linuxbrew/share
|
||||||
/home/linuxbrew/.linuxbrew/var
|
/home/linuxbrew/.linuxbrew/var
|
||||||
key: ${{ runner.os }}-go-homebrew-cellar-${{ hashFiles('go.sum') }}
|
key: ${{ runner.os }}-go-homebrew-cellar-${{ hashFiles('go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-homebrew-cellar-
|
${{ runner.os }}-go-homebrew-cellar-
|
||||||
|
|
||||||
- name: Install Brew dependencies
|
- name: Install Brew dependencies
|
||||||
run: |
|
run: |
|
||||||
brew bundle
|
brew bundle
|
||||||
|
|
||||||
- name: Setup Golang caches
|
- name: Setup Golang caches
|
||||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
~/go/pkg/mod
|
~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-golang-
|
${{ runner.os }}-golang-
|
||||||
|
|
||||||
- name: Cache playwright binaries
|
- uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 # v1.15.1
|
||||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
|
||||||
id: playwright-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/ms-playwright
|
|
||||||
key: ${{ runner.os }}-playwright-${{ hashFiles('**/go.sum') }}
|
|
||||||
|
|
||||||
- name: install node deps
|
- name: Cache playwright binaries
|
||||||
run: |
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
npm ci
|
id: playwright-cache
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/ms-playwright
|
||||||
|
key: ${{ runner.os }}-playwright-${{ hashFiles('**/go.sum') }}
|
||||||
|
|
||||||
- name: install playwright browsers
|
- name: install node deps
|
||||||
run: |
|
run: |
|
||||||
npx --no-install playwright@1.52.0 install --with-deps
|
npm ci
|
||||||
npx --no-install playwright@1.52.0 run-server --port 9001 &
|
|
||||||
|
|
||||||
- name: Build
|
- name: install playwright browsers
|
||||||
run: npm run build
|
run: |
|
||||||
|
npx --no-install playwright@1.52.0 install --with-deps
|
||||||
|
npx --no-install playwright@1.52.0 run-server --port 9001 &
|
||||||
|
|
||||||
- name: Test
|
- name: Build
|
||||||
run: npm run test
|
run: npm run build
|
||||||
|
|
||||||
- name: Lint with staticcheck
|
- name: Test
|
||||||
uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1.4.0
|
run: npm run test
|
||||||
with:
|
|
||||||
version: "latest"
|
|
||||||
|
|
||||||
- name: Govulncheck
|
- name: Lint with staticcheck
|
||||||
run: |
|
uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1.4.0
|
||||||
go tool govulncheck ./...
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
|
- name: Govulncheck
|
||||||
|
run: |
|
||||||
|
go tool govulncheck ./...
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
name: "Rust tests"
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rust-test:
|
||||||
|
name: cargo test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 # v1.15.1
|
||||||
|
- run: cargo test --all-features
|
||||||
|
|
||||||
|
# Check formatting with rustfmt
|
||||||
|
rust-formatting:
|
||||||
|
name: cargo fmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
# Ensure rustfmt is installed and setup problem matcher
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 # v1.15.1
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- name: Rustfmt Check
|
||||||
|
uses: actions-rust-lang/rustfmt@559aa3035a47390ba96088dffa783b5d26da9326 # v1.1.1
|
||||||
@@ -37,6 +37,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: stable
|
go-version: stable
|
||||||
|
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 # v1.15.1
|
||||||
|
|
||||||
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
|
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
|
||||||
|
|
||||||
- name: Install utils
|
- name: Install utils
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
name: Regenerate ssh ci runner image
|
|
||||||
|
|
||||||
on:
|
|
||||||
# pull_request:
|
|
||||||
# branches: ["main"]
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 1,8,15,22 * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ssh-ci-rebuild:
|
|
||||||
if: github.repository == 'TecharoHQ/anubis'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
fetch-tags: true
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Log into registry
|
|
||||||
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
|
||||||
- name: Build and push
|
|
||||||
run: |
|
|
||||||
cd ./test/ssh-ci
|
|
||||||
docker buildx bake --push
|
|
||||||
Reference in New Issue
Block a user