workflows: workflows via nix
This commit is contained in:
parent
42c21ad906
commit
394bf00ce1
39
.gitea/workflows/static.yml
Normal file
39
.gitea/workflows/static.yml
Normal file
@ -0,0 +1,39 @@
|
||||
name: Static
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Flake checks
|
||||
runs-on: nix
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run checks
|
||||
run: nix --print-build-logs --experimental-features 'nix-command flakes' flake check
|
||||
|
||||
dist:
|
||||
name: Create distribution
|
||||
runs-on: nix
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Process static files
|
||||
id: static-test
|
||||
run: >-
|
||||
export HAKUREI_REV="$(git rev-parse --short HEAD)" &&
|
||||
sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' package.nix &&
|
||||
nix build --print-out-paths --print-build-logs .#hakurei-static &&
|
||||
mv package.nix.old package.nix &&
|
||||
echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload static files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "hakurei.app-${{ steps.static-test.outputs.rev }}"
|
||||
path: result/*
|
||||
retention-days: 1
|
17
.github/dependabot.yml
vendored
17
.github/dependabot.yml
vendored
@ -1,17 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: main
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: main
|
||||
- package-ecosystem: pip
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: main
|
25
.github/workflows/static.yml
vendored
25
.github/workflows/static.yml
vendored
@ -1,25 +0,0 @@
|
||||
name: Validate and process static files
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
static:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
cache: npm
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get -y install libxml2-utils yajl-tools moreutils zopfli
|
||||
- run: npm ci --ignore-scripts
|
||||
- run: 'pip install --require-hashes --only-binary :all: -r requirements.txt'
|
||||
|
||||
- name: process static
|
||||
run: ./process-static
|
Loading…
x
Reference in New Issue
Block a user