Compare commits
23 commits
main
...
gitea-acti
Author | SHA1 | Date | |
---|---|---|---|
482ab7c877 | |||
eeeaf4b238 | |||
fcbbc0d0e8 | |||
2edcc17a7c | |||
2dbeb6c45c | |||
c9819bfa93 | |||
fa3db2e586 | |||
3ba6711cfe | |||
804d074c0b | |||
e19b71652d | |||
8bc962a6fe | |||
fc68fb41da | |||
80906614d5 | |||
c69301eb6c | |||
039583ac5c | |||
5054a28ed8 | |||
d3c6fac69b | |||
b0ec03f90d | |||
ad222c229e | |||
ce376c3a50 | |||
97728e4cff | |||
0aa6f8dc3e | |||
87b5350f1f |
2 changed files with 37 additions and 86 deletions
86
.drone.yml
86
.drone.yml
|
@ -1,86 +0,0 @@
|
||||||
name: default
|
|
||||||
kind: pipeline
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: install
|
|
||||||
image: ruby:3.3.1
|
|
||||||
volumes:
|
|
||||||
- name: bundle
|
|
||||||
path: /usr/local/bundle
|
|
||||||
commands:
|
|
||||||
- bin/bundle install --jobs=3 --retry=3
|
|
||||||
|
|
||||||
- name: autoload
|
|
||||||
image: ruby:3.3.1
|
|
||||||
volumes:
|
|
||||||
- name: bundle
|
|
||||||
path: /usr/local/bundle
|
|
||||||
commands:
|
|
||||||
- bin/rails zeitwerk:check
|
|
||||||
depends_on:
|
|
||||||
- install
|
|
||||||
|
|
||||||
- name: lint
|
|
||||||
image: ruby:3.3.1
|
|
||||||
volumes:
|
|
||||||
- name: bundle
|
|
||||||
path: /usr/local/bundle
|
|
||||||
commands:
|
|
||||||
- bin/bundle exec standardrb
|
|
||||||
depends_on:
|
|
||||||
- install
|
|
||||||
|
|
||||||
- name: test
|
|
||||||
image: ruby:3.3.1
|
|
||||||
volumes:
|
|
||||||
- name: bundle
|
|
||||||
path: /usr/local/bundle
|
|
||||||
commands:
|
|
||||||
- bin/rails assets:precompile
|
|
||||||
- bin/rails test
|
|
||||||
depends_on:
|
|
||||||
- install
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: bundle
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
exclude: master
|
|
||||||
event: push
|
|
||||||
|
|
||||||
---
|
|
||||||
name: deploy
|
|
||||||
kind: pipeline
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: docker-build
|
|
||||||
image: plugins/docker
|
|
||||||
environment:
|
|
||||||
SECRET_KEY_BASE:
|
|
||||||
from_secret: secret_key_base
|
|
||||||
RAILS_MASTER_KEY:
|
|
||||||
from_secret: rails_master_key
|
|
||||||
settings:
|
|
||||||
pull_image: true
|
|
||||||
registry: docker.atomaka.com
|
|
||||||
repo: docker.atomaka.com/budget
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- ${DRONE_TAG}
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: unraid_host
|
|
||||||
username:
|
|
||||||
from_secret: unraid_username
|
|
||||||
key:
|
|
||||||
from_secret: unraid_ssh_key
|
|
||||||
script:
|
|
||||||
- docker pull docker.atomaka.com/budget:latest
|
|
||||||
- docker restart budget
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event: tag
|
|
37
.gitea/workflows/test.yaml
Normal file
37
.gitea/workflows/test.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: Ruby CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ruby-latest
|
||||||
|
steps:
|
||||||
|
- name: Install Node
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install git ca-certificates curl gnupg --yes
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y nodejs
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: vendor/bundle
|
||||||
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gems-
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
bundle config path vendor/bundle
|
||||||
|
bundle install --jobs 4 --retry 3
|
||||||
|
- name: autoload
|
||||||
|
run: bin/rails zeitwerk:check
|
||||||
|
- name: lint
|
||||||
|
run: bin/bundle exec standardrb
|
||||||
|
- name: test
|
||||||
|
run: |
|
||||||
|
bin/rails assets:precompile
|
||||||
|
bin/rails test
|
Loading…
Reference in a new issue