From 87b5350f1f47ee043baf7128cf3b8feaf9578568 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 18:50:43 -0400 Subject: [PATCH 01/47] Try out gitea actions --- .drone.yml | 86 -------------------------------------- .gitea/workflows/test.yaml | 25 +++++++++++ 2 files changed, 25 insertions(+), 86 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/test.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 34389c8..0000000 --- a/.drone.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: default -kind: pipeline - -steps: -- name: install - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/bundle install --jobs=3 --retry=3 - -- name: autoload - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/rails zeitwerk:check - depends_on: - - install - -- name: lint - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/bundle exec standardrb - depends_on: - - install - -- name: test - image: ruby:3.2.0 - 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 diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..ad72a7b --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,25 @@ +name: Ruby CI + +on: + pull_request: + +jobs: + test: + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby 3.2.0 + uses: ruby/setup-ruby + with: + ruby-version: 3.2.0 + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake + - name: autoload + run: bin/rails zeitwerk:check + - name: lint + run: bin/bundle exec standardrb + - name: test + run: | + bin/rails assets:precompile + bin/rails test -- 2.45.2 From 0aa6f8dc3e47ce156808d1d446f96b68f65e91c5 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 18:55:06 -0400 Subject: [PATCH 02/47] Provide label --- .gitea/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index ad72a7b..8029540 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,6 +5,7 @@ on: jobs: test: + runs-on: all steps: - uses: actions/checkout@v4 - name: Set up Ruby 3.2.0 -- 2.45.2 From 97728e4cffe9592c1a03fb8b6073364f9fcca2d2 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 18:56:55 -0400 Subject: [PATCH 03/47] Provide ref for setup-ruby --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 8029540..c57f207 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Ruby 3.2.0 - uses: ruby/setup-ruby + uses: ruby/setup-ruby@v1 with: ruby-version: 3.2.0 - name: Install dependencies -- 2.45.2 From ce376c3a5044b1373119d56433562d2a5ff2e42b Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 18:57:26 -0400 Subject: [PATCH 04/47] Remove extra rake call --- .gitea/workflows/test.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index c57f207..ce9c5b8 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -14,8 +14,6 @@ jobs: ruby-version: 3.2.0 - name: Install dependencies run: bundle install - - name: Run tests - run: bundle exec rake - name: autoload run: bin/rails zeitwerk:check - name: lint -- 2.45.2 From ad222c229eb89196cf4e3012935ecf86a1282d84 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:07:37 -0400 Subject: [PATCH 05/47] Use correct runs-on --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index ce9c5b8..7ef9b7f 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,7 +5,7 @@ on: jobs: test: - runs-on: all + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Ruby 3.2.0 -- 2.45.2 From b0ec03f90d2c9ef79a25bc826053c5fd3aad9a95 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:10:30 -0400 Subject: [PATCH 06/47] Revert "Use correct runs-on" This reverts commit ad222c229eb89196cf4e3012935ecf86a1282d84. --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 7ef9b7f..ce9c5b8 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,7 +5,7 @@ on: jobs: test: - runs-on: ubuntu-latest + runs-on: all steps: - uses: actions/checkout@v4 - name: Set up Ruby 3.2.0 -- 2.45.2 From d3c6fac69bb21335cd3185877e9727a48c0c116e Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:19:20 -0400 Subject: [PATCH 07/47] And now actually use ubuntu-latest --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index ce9c5b8..7ef9b7f 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,7 +5,7 @@ on: jobs: test: - runs-on: all + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Ruby 3.2.0 -- 2.45.2 From 5054a28ed8a7bb8bce17b245d46eca98abbcd203 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:38:45 -0400 Subject: [PATCH 08/47] =?UTF-8?q?(=20=CD=A1=C2=B0=20=CD=9C=CA=96=20=CD=A1?= =?UTF-8?q?=C2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 7ef9b7f..908e7ce 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,6 +5,7 @@ on: jobs: test: + image: ruby:3.2.0 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 -- 2.45.2 From 039583ac5c6013d700a6ba4ddd398ccc051d633f Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:39:55 -0400 Subject: [PATCH 09/47] Remove setup ruby --- .gitea/workflows/test.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 908e7ce..8ade782 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -9,10 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Ruby 3.2.0 - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.2.0 - name: Install dependencies run: bundle install - name: autoload -- 2.45.2 From c69301eb6c8add89ff4bb1d6511ac4ad0a0f5ecc Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:40:53 -0400 Subject: [PATCH 10/47] install bundle --- .gitea/workflows/test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 8ade782..11503c2 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -10,7 +10,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install dependencies - run: bundle install + run: | + gem install bundle + bundle install - name: autoload run: bin/rails zeitwerk:check - name: lint -- 2.45.2 From 80906614d573d3eadf8b57c501967377ed8a71a6 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:46:14 -0400 Subject: [PATCH 11/47] Runs on new ruby runner --- .gitea/workflows/test.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 11503c2..1491ab4 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,14 +5,11 @@ on: jobs: test: - image: ruby:3.2.0 - runs-on: ubuntu-latest + runs-on: ruby:3.2.0 steps: - uses: actions/checkout@v4 - name: Install dependencies - run: | - gem install bundle - bundle install + run: bundle install - name: autoload run: bin/rails zeitwerk:check - name: lint -- 2.45.2 From fc68fb41da707bbe1c8849d30b3817a66f3c2a0a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 19:53:24 -0400 Subject: [PATCH 12/47] =?UTF-8?q?(=20=CD=A1=C2=B0=20=CD=9C=CA=96=20=CD=A1?= =?UTF-8?q?=C2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 1491ab4..772f675 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,7 +5,7 @@ on: jobs: test: - runs-on: ruby:3.2.0 + runs-on: ruby-3.2.0 steps: - uses: actions/checkout@v4 - name: Install dependencies -- 2.45.2 From 8bc962a6fef2caf39a00026da923682a0a2a84b5 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 21:08:57 -0400 Subject: [PATCH 13/47] Install node, new base image run --- .gitea/workflows/test.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 772f675..7a4bff8 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,9 +5,17 @@ on: jobs: test: - runs-on: ruby-3.2.0 + runs-on: ubuntu-latest steps: + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2.0 - name: Install dependencies run: bundle install - name: autoload -- 2.45.2 From e19b71652d5b0bbd2c9b2007b3971e958972dd69 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 21:11:10 -0400 Subject: [PATCH 14/47] =?UTF-8?q?(=20=CD=A1=C2=B0=20=CD=9C=CA=96=20=CD=A1?= =?UTF-8?q?=C2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 7a4bff8..abedfbc 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -7,10 +7,8 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 20 + - name: Install Node + run: apt-get install nodejs - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 -- 2.45.2 From 804d074c0b74f638a94474c8256c15040458f8c7 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 21:12:22 -0400 Subject: [PATCH 15/47] Update packages before install --- .gitea/workflows/test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index abedfbc..d362f3e 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -8,7 +8,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Node - run: apt-get install nodejs + run: | + apt-get update + apt-get install nodejs - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 -- 2.45.2 From 3ba6711cfe9a6cb4018c926550fafe61f2ee8822 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 21:14:33 -0400 Subject: [PATCH 16/47] Skip interactive --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index d362f3e..03d914e 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: - name: Install Node run: | apt-get update - apt-get install nodejs + apt-get install nodejs --yes - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 -- 2.45.2 From fa3db2e58613d465ebd2b36fa473775195fe0a0d Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 21:16:20 -0400 Subject: [PATCH 17/47] Add git --- .gitea/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 03d914e..c0690fd 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -7,10 +7,10 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Install Node + - name: Install Dependencies run: | apt-get update - apt-get install nodejs --yes + apt-get install nodejs git --yes - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 -- 2.45.2 From c9819bfa934bcbcc644f1bfc8a31ae46df857246 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 21:20:53 -0400 Subject: [PATCH 18/47] Install a newer node version --- .gitea/workflows/test.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index c0690fd..2c63b9b 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -10,7 +10,12 @@ jobs: - name: Install Dependencies run: | apt-get update - apt-get install nodejs git --yes + 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 - name: Set up Ruby uses: ruby/setup-ruby@v1 -- 2.45.2 From 2edcc17a7cf50171d5cf03d88e4613f223f5348a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 23 Apr 2024 20:55:06 -0400 Subject: [PATCH 19/47] Give up on setup-ruby action --- .gitea/workflows/test.yaml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 2c63b9b..d3e98ce 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,22 +5,9 @@ on: jobs: test: - runs-on: ubuntu-latest + runs-on: ruby-latest steps: - - name: Install Dependencies - 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 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.2.0 - name: Install dependencies run: bundle install - name: autoload -- 2.45.2 From fcbbc0d0e83bf0b5014db96d61588a445022abda Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 23 Apr 2024 20:57:59 -0400 Subject: [PATCH 20/47] Still need node --- .gitea/workflows/test.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index d3e98ce..2be0568 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -7,6 +7,15 @@ 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 - name: Install dependencies run: bundle install -- 2.45.2 From 482ab7c8779cf984570615ed16c94f309ee87f1f Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 25 Apr 2024 23:31:08 -0400 Subject: [PATCH 21/47] Try with cache --- .gitea/workflows/test.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 2be0568..d1a7cec 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -17,8 +17,16 @@ jobs: 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 install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 - name: autoload run: bin/rails zeitwerk:check - name: lint -- 2.45.2 From 83daa7a6a112538204a649621a974edc2e943599 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 09:28:39 -0400 Subject: [PATCH 22/47] Update to Rubocop / brakeman --- .gitea/workflows/test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index d1a7cec..ddaa336 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -30,7 +30,9 @@ jobs: - name: autoload run: bin/rails zeitwerk:check - name: lint - run: bin/bundle exec standardrb + run: bin/rubocop + - name: security + run: bin/brakeman - name: test run: | bin/rails assets:precompile -- 2.45.2 From 171ba48766d99cc07833485b7d6605700585248e Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 10:02:02 -0400 Subject: [PATCH 23/47] Sling it --- .gitea/workflows/deploy.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..6b36afb --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,17 @@ +name: Deploy + +on: + tag: + +jobs: + deploy: + runs-on: ruby-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v5 + context: + push: true + tags: + - docker.atomaka.com/budget:latest + - docker.atomaka.com/budget:${{gitea.tag}} -- 2.45.2 From f36fb46d83e8bf1f86ca112ed2f12a579f13e813 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 10:03:23 -0400 Subject: [PATCH 24/47] Testing --- .gitea/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 6b36afb..f6b86e4 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -13,5 +13,5 @@ jobs: context: push: true tags: - - docker.atomaka.com/budget:latest + - docker.atomaka.com/budget:fake - docker.atomaka.com/budget:${{gitea.tag}} -- 2.45.2 From 7a7d004fc8763c93c5534ac83689d90e5c164bb1 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 10:05:58 -0400 Subject: [PATCH 25/47] Test on push --- .gitea/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f6b86e4..f64b7df 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,6 +2,7 @@ name: Deploy on: tag: + push: jobs: deploy: @@ -14,4 +15,4 @@ jobs: push: true tags: - docker.atomaka.com/budget:fake - - docker.atomaka.com/budget:${{gitea.tag}} + - docker.atomaka.com/budget:${{gitea.sha}} -- 2.45.2 From 71b1f984b5694be1b460f8c0eaf2449cdee04fb6 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 10:08:03 -0400 Subject: [PATCH 26/47] Install node --- .gitea/workflows/deploy.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f64b7df..b374894 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -8,6 +8,15 @@ jobs: deploy: 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: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v5 -- 2.45.2 From dcdd3d8f79064c6440e034e41974ae24a76c1806 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 10:16:37 -0400 Subject: [PATCH 27/47] Test tags as string --- .gitea/workflows/deploy.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b374894..1ad1bb0 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -22,6 +22,4 @@ jobs: - uses: docker/build-push-action@v5 context: push: true - tags: - - docker.atomaka.com/budget:fake - - docker.atomaka.com/budget:${{gitea.sha}} + tags: "docker.atomaka.com/budget:fake,docker.atomaka.com/budget:${{gitea.sha}}" -- 2.45.2 From 5b46c7f96e399bac58ffaeaebefba4fefbb005a8 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 11:10:30 -0400 Subject: [PATCH 28/47] Just fake? --- .gitea/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 1ad1bb0..2b29e8e 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -22,4 +22,4 @@ jobs: - uses: docker/build-push-action@v5 context: push: true - tags: "docker.atomaka.com/budget:fake,docker.atomaka.com/budget:${{gitea.sha}}" + tags: docker.atomaka.com/budget:fake -- 2.45.2 From ad285fa8485d21c13a78ce4e1954812c11381918 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 21:04:24 -0400 Subject: [PATCH 29/47] Without checkout? --- .gitea/workflows/deploy.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 2b29e8e..0bff358 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -17,7 +17,12 @@ jobs: 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 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v5 context: -- 2.45.2 From 9b9cebbbea0ab5b8b5d74e7efa2b91fb6ced30da Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 21:05:46 -0400 Subject: [PATCH 30/47] Skip setup qemu --- .gitea/workflows/deploy.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 0bff358..4341225 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -17,14 +17,11 @@ jobs: 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 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v5 context: push: true - tags: docker.atomaka.com/budget:fake + tags: | + docker.atomaka.com/budget:fake -- 2.45.2 From e37d8a830a72b45fb378e4c4cb429f8dbee9c049 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 21:12:47 -0400 Subject: [PATCH 31/47] v6 --- .gitea/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 4341225..348da0c 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -20,7 +20,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@v6 context: push: true tags: | -- 2.45.2 From bf220831b8d251c97fbdd732a050fc07b81b2213 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 23 Jun 2024 21:33:10 -0400 Subject: [PATCH 32/47] Try different image --- .gitea/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 348da0c..995c9d6 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -6,7 +6,7 @@ on: jobs: deploy: - runs-on: ruby-latest + runs-on: cth-ubuntu-latest steps: - name: Install Node run: | -- 2.45.2 From 0fc3e298b275f155b8cfd734140f5ec13038c4f1 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 22:50:42 -0400 Subject: [PATCH 33/47] Stop with push --- .gitea/workflows/deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 995c9d6..6002a82 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,7 +2,6 @@ name: Deploy on: tag: - push: jobs: deploy: -- 2.45.2 From 421be9ab2e314672fbcaf16eac4915f9f5601e7c Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 22:51:19 -0400 Subject: [PATCH 34/47] Try without node --- .gitea/workflows/deploy.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 6002a82..ebc34ab 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,22 +2,13 @@ name: Deploy on: tag: + push: jobs: deploy: runs-on: cth-ubuntu-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 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v6 context: -- 2.45.2 From bf67ee5bac978acc5fc073b40721f3a7f524e121 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 22:53:42 -0400 Subject: [PATCH 35/47] Stop push for real --- .gitea/workflows/deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index ebc34ab..5f1a768 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,7 +2,6 @@ name: Deploy on: tag: - push: jobs: deploy: -- 2.45.2 From 6bfa4afbb61c65bc2d902faffdb202a205375437 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:06:13 -0400 Subject: [PATCH 36/47] Setup deploy to server --- .gitea/workflows/deploy.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 5f1a768..2ec2115 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,8 +9,19 @@ jobs: steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - uses: docker/build-push-action@v6 + - name: Push image + uses: docker/build-push-action@v6 context: push: true tags: | - docker.atomaka.com/budget:fake + docker.atomaka.com/budget:latest + docker.atomaka.com/budget:${{gitea.sha}} + - name: Deploy to server + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + script: | + docker pull docker.atomaka.com/budget:latest + docker restart budget -- 2.45.2 From ccfe99996f4b1779a1c9a263dd655df0be2bdb4e Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:06:35 -0400 Subject: [PATCH 37/47] And on push again xD --- .gitea/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 2ec2115..f2852da 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,6 +2,7 @@ name: Deploy on: tag: + push: jobs: deploy: -- 2.45.2 From 65a97b96b24d4418778410c246ad1e9fedafe9a3 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:15:26 -0400 Subject: [PATCH 38/47] with, not context --- .gitea/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f2852da..c186e87 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -12,7 +12,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Push image uses: docker/build-push-action@v6 - context: + with: push: true tags: | docker.atomaka.com/budget:latest -- 2.45.2 From 67f47e7d2204f5856a899dc7a6db2dd3632623f9 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:32:12 -0400 Subject: [PATCH 39/47] Finally working --- .gitea/workflows/deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index c186e87..f08ef2f 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,7 +2,6 @@ name: Deploy on: tag: - push: jobs: deploy: -- 2.45.2 From a58c05deb746719dc388b9d714fb6dc6e395370b Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:36:35 -0400 Subject: [PATCH 40/47] Try with setupruby on new image --- .gitea/workflows/test.yaml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index ddaa336..4a6fc5d 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -5,17 +5,11 @@ on: 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 + runs-on: cth-ubuntu-latest + # runs-on: ruby-latest + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3.1 - uses: actions/checkout@v4 - uses: actions/cache@v2 with: -- 2.45.2 From 7f23f49cb168a7ff65702ae638bc1fd8fdadbeb1 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:37:58 -0400 Subject: [PATCH 41/47] =?UTF-8?q?=C2=AF\=5F(=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 4a6fc5d..7c375b5 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -6,7 +6,6 @@ on: jobs: test: runs-on: cth-ubuntu-latest - # runs-on: ruby-latest - uses: ruby/setup-ruby@v1 with: ruby-version: 3.3.1 -- 2.45.2 From c7c357d9ec0deaff62e307609177c62dd603f33e Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:39:25 -0400 Subject: [PATCH 42/47] =?UTF-8?q?(=20=CD=A1=C2=B0=20=CD=9C=CA=96=20=CD=A1?= =?UTF-8?q?=C2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 7c375b5..247d0ab 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -6,6 +6,7 @@ on: jobs: test: runs-on: cth-ubuntu-latest + steps: - uses: ruby/setup-ruby@v1 with: ruby-version: 3.3.1 -- 2.45.2 From 46241207ec3aff568c7b20738c812f7537557a08 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:52:51 -0400 Subject: [PATCH 43/47] remove deploy for now --- .gitea/workflows/deploy.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f08ef2f..64fd04e 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -16,12 +16,3 @@ jobs: tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} - - name: Deploy to server - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USERNAME }} - key: ${{ secrets.SSH_KEY }} - script: | - docker pull docker.atomaka.com/budget:latest - docker restart budget -- 2.45.2 From 7d32146ce2a2c3ee7c3d4fc9cfb08ac1ca50f330 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 5 Jul 2024 00:04:05 -0400 Subject: [PATCH 44/47] REadd deploy --- .gitea/workflows/deploy.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 64fd04e..1ebd94d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -16,3 +16,11 @@ jobs: tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} + - name: Deploy to server + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + script: | + bash "/boot/config/plugins/user.scripts/scripts/deploy budget/script" -- 2.45.2 From 3a82681916c7bf7dae879a74dc02c6fa66abcea7 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 5 Jul 2024 00:04:23 -0400 Subject: [PATCH 45/47] test again --- .gitea/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 1ebd94d..f2c223d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,6 +2,7 @@ name: Deploy on: tag: + push: jobs: deploy: -- 2.45.2 From 2eadd0ff891f1290540aa9978c82bd445bc41270 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 5 Jul 2024 00:09:47 -0400 Subject: [PATCH 46/47] Stop testing --- .gitea/workflows/deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f2c223d..1ebd94d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,7 +2,6 @@ name: Deploy on: tag: - push: jobs: deploy: -- 2.45.2 From de6a7acff2cdadfa77474877f83a19acf49ac8e5 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 5 Jul 2024 00:17:53 -0400 Subject: [PATCH 47/47] V4 cache --- .gitea/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 247d0ab..07b4d25 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -11,7 +11,7 @@ jobs: with: ruby-version: 3.3.1 - uses: actions/checkout@v4 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} -- 2.45.2