From fc8f764bfc0a2c047e904e1c0bfa95ce1ec9edf8 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 22:30:20 -0500 Subject: [PATCH 01/13] Bump ruby version --- .ruby-version | 2 +- Dockerfile | 2 +- Gemfile.lock | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.ruby-version b/.ruby-version index fa7adc7..9c25013 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.5 +3.3.6 diff --git a/Dockerfile b/Dockerfile index 0639c80..4687452 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ # For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html # Make sure RUBY_VERSION matches the Ruby version in .ruby-version -ARG RUBY_VERSION=3.3.1 +ARG RUBY_VERSION=3.3.6 FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base # Rails app lives here diff --git a/Gemfile.lock b/Gemfile.lock index 91b4eac..50e5c7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -309,6 +309,7 @@ GEM PLATFORMS aarch64-linux arm64-darwin-23 + arm64-darwin-24 x86_64-linux DEPENDENCIES @@ -334,4 +335,4 @@ DEPENDENCIES web-console BUNDLED WITH - 2.5.18 + 2.5.23 -- 2.45.2 From 2538335e1786e6896bbc9f31bf30b5cd94e1d20c Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 22:31:57 -0500 Subject: [PATCH 02/13] Use .ruby-version for setup-ruby --- .gitea/workflows/test.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 5e2b75a..cf3073b 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -8,8 +8,6 @@ jobs: runs-on: cth-ubuntu-latest steps: - uses: https://github.com/ruby/setup-ruby@v1 - with: - ruby-version: 3.3.5 - uses: actions/checkout@v4 - uses: actions/cache@v4 with: -- 2.45.2 From 9e259b8f42dcff7c5a2fc2f40335cf7fa3219243 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 22:48:03 -0500 Subject: [PATCH 03/13] Try reading Ruby version from .ruby-version --- .gitea/workflows/deploy.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index a84fc7f..ea2f05c 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,12 +9,17 @@ jobs: deploy: runs-on: cth-ubuntu-latest steps: + - name: Read Ruby file + id: ruby + run: echo "version=$(cat .ruby-version)" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Push image uses: docker/build-push-action@v6 with: push: true + build-args: + RUBY_VERSION: ${{ steps.ruby.outputs.version }} tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} -- 2.45.2 From f446d7a6324aa883828d9e46291d24ded6bd42c8 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 22:49:51 -0500 Subject: [PATCH 04/13] Setup second --- .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 cf3073b..54b25d8 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -7,8 +7,8 @@ jobs: test: runs-on: cth-ubuntu-latest steps: - - uses: https://github.com/ruby/setup-ruby@v1 - uses: actions/checkout@v4 + - uses: https://github.com/ruby/setup-ruby@v1 - uses: actions/cache@v4 with: path: vendor/bundle -- 2.45.2 From 53681e01545bce0e05f5d9fcc8a5e7cec65027cd Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:04:34 -0500 Subject: [PATCH 05/13] Test 3.3.5...for now --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 9c25013..fa7adc7 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.6 +3.3.5 -- 2.45.2 From e48911dacb046411e49315b159d4acf57491e03f Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:06:44 -0500 Subject: [PATCH 06/13] Allow deploy test without actual deploy --- .gitea/workflows/deploy.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index ea2f05c..707491c 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -23,7 +23,3 @@ jobs: tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} - - name: Deploy to server - run: | - curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \ - ${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/budget -- 2.45.2 From bfc11672f08dc5d8e8f13169bfe372295baf0fa9 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:19:09 -0500 Subject: [PATCH 07/13] No deploy, but without other changes? --- .gitea/workflows/deploy.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 707491c..ecdb194 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,17 +9,12 @@ jobs: deploy: runs-on: cth-ubuntu-latest steps: - - name: Read Ruby file - id: ruby - run: echo "version=$(cat .ruby-version)" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Push image uses: docker/build-push-action@v6 with: push: true - build-args: - RUBY_VERSION: ${{ steps.ruby.outputs.version }} tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} -- 2.45.2 From ebecec8673c4cd046251a459e27096bcb81ada95 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:24:18 -0500 Subject: [PATCH 08/13] Try reading .ruby-version now --- .gitea/workflows/deploy.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index ecdb194..8bbc999 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,6 +9,9 @@ jobs: deploy: runs-on: cth-ubuntu-latest steps: + - name: Read .ruby-version file + id: ruby + run: echo "version=$(cat .ruby-version)" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Push image -- 2.45.2 From e7a48430721eba84571cea0ba37ec9d272f6aac7 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:27:30 -0500 Subject: [PATCH 09/13] Checkout first --- .gitea/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 8bbc999..1db795b 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,6 +9,7 @@ jobs: deploy: runs-on: cth-ubuntu-latest steps: + - uses: actions/checkout@v4 - name: Read .ruby-version file id: ruby run: echo "version=$(cat .ruby-version)" >> $GITHUB_OUTPUT -- 2.45.2 From cfdd685c6fc7a302985311597cd68862a8570e02 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:30:11 -0500 Subject: [PATCH 10/13] Use .ruby-version from output --- .gitea/workflows/deploy.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 1db795b..e46a3f1 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -19,6 +19,8 @@ jobs: uses: docker/build-push-action@v6 with: push: true + build-args: | + RUBY_VERSION=${{ steps.ruby.outputs.version }} tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} -- 2.45.2 From cc2412ef866300724c006e88f755d170ebee67df Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:33:26 -0500 Subject: [PATCH 11/13] Readd deployment step --- .gitea/workflows/deploy.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index e46a3f1..a7a79e5 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -24,3 +24,7 @@ jobs: tags: | docker.atomaka.com/budget:latest docker.atomaka.com/budget:${{gitea.sha}} + - name: Deploy to server + run: | + curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \ + ${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/budget -- 2.45.2 From 9462471fbd82acbf88610a4bd54eacd8eebec6a2 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:37:59 -0500 Subject: [PATCH 12/13] Watch 3.3.6 fail again --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index fa7adc7..9c25013 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.5 +3.3.6 -- 2.45.2 From 4839686293d67bb23cbb35bbfc54e864d03b6826 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 26 Nov 2024 23:42:51 -0500 Subject: [PATCH 13/13] Force specific sha --- .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 54b25d8..e7754fc 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -8,7 +8,7 @@ jobs: runs-on: cth-ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: https://github.com/ruby/setup-ruby@v1 + - uses: https://github.com/ruby/setup-ruby@217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed - uses: actions/cache@v4 with: path: vendor/bundle -- 2.45.2