Migrate to forgejo
This commit is contained in:
parent
6dc91e6045
commit
4bb83fb35a
3 changed files with 32 additions and 48 deletions
30
.forgejo/workflows/build.yml
Normal file
30
.forgejo/workflows/build.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Set up pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 10
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: pnpm run build
|
||||||
|
|
||||||
|
- name: Check project
|
||||||
|
run: pnpm run check
|
||||||
|
|
@ -3,8 +3,6 @@ name: Deploy
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
runs-on: selfhost
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: selfhost
|
runs-on: selfhost
|
||||||
|
|
@ -13,8 +11,8 @@ jobs:
|
||||||
- name: get artifact
|
- name: get artifact
|
||||||
run: |
|
run: |
|
||||||
curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \
|
curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \
|
||||||
https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz > build.tar.gz
|
https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ forgejo.ref }}/build-${{ forgejo.ref }}.tar.gz > build.tar.gz
|
||||||
echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz
|
echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ forgejo.ref }}/build-${{ forgejo.ref }}.tar.gz
|
||||||
- name: extract artifact
|
- name: extract artifact
|
||||||
run: |
|
run: |
|
||||||
tar -xvzf build.tar.gz
|
tar -xvzf build.tar.gz
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
name: Build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup pnpm
|
|
||||||
uses: https://github.com/pnpm/action-setup@v4
|
|
||||||
with:
|
|
||||||
version: 9
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Setup node
|
|
||||||
uses: https://github.com/actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Build projects
|
|
||||||
run: pnpm run build
|
|
||||||
|
|
||||||
- name: Run checks
|
|
||||||
run: pnpm run check
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
run: |
|
|
||||||
tar -czf build.tar.gz build
|
|
||||||
curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \
|
|
||||||
--upload-file build.tar.gz \
|
|
||||||
https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz
|
|
||||||
echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz
|
|
||||||
Loading…
Reference in a new issue