From 961e9a206a68efb97de4aaabf8d6cea34b1a7590 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:06:45 -0400 Subject: [PATCH 01/19] Update gemfile? --- Gemfile.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 5be0148..8c896ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,6 +36,7 @@ GEM faraday-net_http (3.0.2) ffi (1.15.5) forwardable-extended (2.6.0) + google-protobuf (3.21.12) google-protobuf (3.21.12-x86_64-linux) htmlbeautifier (1.4.2) htmlcompressor (0.4.0) @@ -98,6 +99,8 @@ GEM tomlrb mixlib-shellout (3.2.7) chef-utils + nokogiri (1.14.1-arm64-darwin) + racc (~> 1.4) nokogiri (1.14.1-x86_64-linux) racc (~> 1.4) octokit (4.25.1) @@ -132,6 +135,7 @@ GEM webrick (1.8.1) PLATFORMS + arm64-darwin-23 x86_64-linux DEPENDENCIES -- 2.45.2 From 4d35c3c331750e4bff0e109952e53f7724dffd47 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:06:54 -0400 Subject: [PATCH 02/19] Try container, but it will probably fail --- .gitea/workflows/lint.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .gitea/workflows/lint.yaml diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..70000f2 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,19 @@ +name: Linting + +on: + pull_request: + +jobs: + lint: + runs-on: cth-ubuntu-latest + container: + image: docker.atomaka.com/mdformat + steps: + - run: mdformat --check _posts/ + build: + runs-on: cth-ubuntu-latest + steps: + - run: | + gem install bundler + bundle install + bundle exec jekyll build -- 2.45.2 From 818c21bd390b478ec6f0af488fe78f00b7e73af7 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:08:04 -0400 Subject: [PATCH 03/19] noop -- 2.45.2 From 74c9adaa82ba4091ecc7832c3bc4037ff9bf6bca Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:10:22 -0400 Subject: [PATCH 04/19] Check out the source --- .gitea/workflows/lint.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 70000f2..ee0ab74 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -9,11 +9,13 @@ jobs: container: image: docker.atomaka.com/mdformat steps: - - run: mdformat --check _posts/ + - uses: actions/checkout@v4 + - run: mdformat --check _posts/ build: runs-on: cth-ubuntu-latest steps: - - run: | - gem install bundler - bundle install - bundle exec jekyll build + - uses: actions/checkout@v4 + - run: | + gem install bundler + bundle install + bundle exec jekyll build -- 2.45.2 From 0c064fcbfb58062c78d98c0df345fb5c2db9db4b Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:12:15 -0400 Subject: [PATCH 05/19] Install ruby --- .gitea/workflows/lint.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index ee0ab74..b96a235 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -15,6 +15,9 @@ jobs: runs-on: cth-ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.2 - run: | gem install bundler bundle install -- 2.45.2 From 9032ea02c9de33053e03e84062fab762b24f6e0a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:13:58 -0400 Subject: [PATCH 06/19] Run docker container directly --- .gitea/workflows/lint.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index b96a235..1568a35 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -6,11 +6,9 @@ on: jobs: lint: runs-on: cth-ubuntu-latest - container: - image: docker.atomaka.com/mdformat steps: - uses: actions/checkout@v4 - - run: mdformat --check _posts/ + - run: docker run docker.atomaka.com/mdformat mdformat --check _posts/ build: runs-on: cth-ubuntu-latest steps: -- 2.45.2 From fe2a7117c413fd64d0d54eb1ee45ebd3b86e9c89 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 21:37:08 -0400 Subject: [PATCH 07/19] Mount the image --- .gitea/workflows/lint.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 1568a35..3be9a7d 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -8,7 +8,11 @@ jobs: runs-on: cth-ubuntu-latest steps: - uses: actions/checkout@v4 - - run: docker run docker.atomaka.com/mdformat mdformat --check _posts/ + - run: | + docker run \ + --volume /workspace/atomaka/atomaka.com:src \ + docker.atomaka.com/mdformat \ + mdformat --check src/_posts/ build: runs-on: cth-ubuntu-latest steps: -- 2.45.2 From c7725058dcdeb2a3c682835738a97baa61f2db16 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 22:01:06 -0400 Subject: [PATCH 08/19] Use absolute path --- .gitea/workflows/lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 3be9a7d..c5bcda4 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -10,9 +10,9 @@ jobs: - uses: actions/checkout@v4 - run: | docker run \ - --volume /workspace/atomaka/atomaka.com:src \ + --volume /workspace/atomaka/atomaka.com:/src \ docker.atomaka.com/mdformat \ - mdformat --check src/_posts/ + mdformat --check /src/_posts/ build: runs-on: cth-ubuntu-latest steps: -- 2.45.2 From f9ff89efb467534d34add7d2fc5b576da73803f6 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 22:03:09 -0400 Subject: [PATCH 09/19] Debug --- .gitea/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index c5bcda4..2567103 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -12,7 +12,7 @@ jobs: docker run \ --volume /workspace/atomaka/atomaka.com:/src \ docker.atomaka.com/mdformat \ - mdformat --check /src/_posts/ + ls -la /src/ build: runs-on: cth-ubuntu-latest steps: -- 2.45.2 From 3bb841fc3a623a3b0f2684a86507a7868e30273e Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 22:09:02 -0400 Subject: [PATCH 10/19] Debug out of container --- .gitea/workflows/lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 2567103..2a1ae9a 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -9,6 +9,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: | + ls -la /workspace/atomaka/atomaka.com docker run \ --volume /workspace/atomaka/atomaka.com:/src \ docker.atomaka.com/mdformat \ -- 2.45.2 From 1e964c9be9025f6e075aa1fc7313449004b01cad Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 22:14:55 -0400 Subject: [PATCH 11/19] =?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/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 2a1ae9a..9265027 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -11,7 +11,7 @@ jobs: - run: | ls -la /workspace/atomaka/atomaka.com docker run \ - --volume /workspace/atomaka/atomaka.com:/src \ + --volume /workspace/atomaka/atomaka.com/:/src \ docker.atomaka.com/mdformat \ ls -la /src/ build: -- 2.45.2 From 3f351610c53c368058ca8e1a820c0ef884c9818d Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 22:30:00 -0400 Subject: [PATCH 12/19] Data volume; remove after run --- .gitea/workflows/lint.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 9265027..dd948f3 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -11,9 +11,10 @@ jobs: - run: | ls -la /workspace/atomaka/atomaka.com docker run \ - --volume /workspace/atomaka/atomaka.com/:/src \ + --rm \ + --volume /workspace/atomaka/atomaka.com/:/data \ docker.atomaka.com/mdformat \ - ls -la /src/ + ls -la /data/ build: runs-on: cth-ubuntu-latest steps: -- 2.45.2 From 9073df8de7353b7d8d4780576c561247ef16504c Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 23:01:30 -0400 Subject: [PATCH 13/19] try docker run action --- .gitea/workflows/lint.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index dd948f3..dc47192 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -8,13 +8,13 @@ jobs: runs-on: cth-ubuntu-latest steps: - uses: actions/checkout@v4 - - run: | - ls -la /workspace/atomaka/atomaka.com - docker run \ - --rm \ - --volume /workspace/atomaka/atomaka.com/:/data \ - docker.atomaka.com/mdformat \ - ls -la /data/ + - uses: addnab/docker-run-action@v3 + with: + image: docker.atomaka.com/mdformat:latest + options: --volumes-from=${{ env.JOB_CONTAINER_NAME }} + run: | + cd ${{ github.workspace }} + mdformat --check _posts/ build: runs-on: cth-ubuntu-latest steps: -- 2.45.2 From 74edf4d8bc99db67a7a81e7f7d46e80e70a5e09c Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 23:03:48 -0400 Subject: [PATCH 14/19] break lint --- _posts/2023-07-07-delete-your-code.md | 1 - 1 file changed, 1 deletion(-) diff --git a/_posts/2023-07-07-delete-your-code.md b/_posts/2023-07-07-delete-your-code.md index 679367c..04c1c6d 100644 --- a/_posts/2023-07-07-delete-your-code.md +++ b/_posts/2023-07-07-delete-your-code.md @@ -3,7 +3,6 @@ layout: post title: Delete your code date: 2023-07-07 13:20 -0400 --- - One of the most consistent things I have observed over the last two decades while working with software engineering teams is an unwillingness to delete code. Functions and files left long after they have been replaced. Hundred -- 2.45.2 From 3e3dbc25557e167459313501acafd597060fe82a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Jul 2024 23:04:54 -0400 Subject: [PATCH 15/19] Revert "break lint" This reverts commit 74edf4d8bc99db67a7a81e7f7d46e80e70a5e09c. --- _posts/2023-07-07-delete-your-code.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_posts/2023-07-07-delete-your-code.md b/_posts/2023-07-07-delete-your-code.md index 04c1c6d..679367c 100644 --- a/_posts/2023-07-07-delete-your-code.md +++ b/_posts/2023-07-07-delete-your-code.md @@ -3,6 +3,7 @@ layout: post title: Delete your code date: 2023-07-07 13:20 -0400 --- + One of the most consistent things I have observed over the last two decades while working with software engineering teams is an unwillingness to delete code. Functions and files left long after they have been replaced. Hundred -- 2.45.2 From 8553ac1d9f9cdf1e7b95f3d6698a6f3c0be9de98 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 13 Jul 2024 16:19:16 -0400 Subject: [PATCH 16/19] Setup deploy --- .gitea/workflows/deploy.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..372293b --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,32 @@ +name: Deploy + +on: + push: + tags: + - '*' + +jobs: + deploy: + runs-on: cth-ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.2 + - run: | + gem install bundler + bundle install + bundle exec jekyll build + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Push image + uses: docker/build-push-action@v6 + with: + push: true + tags: | + docker.atomaka.com/atomaka.com:latest + docker.atomaka.com/atomaka.com:${{gitea.ref_name}} + - name: Deploy to server + run: | + curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \ + ${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/atomaka.com -- 2.45.2 From c4911976c4361a4d16b634926ab95438635dd0b9 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 13 Jul 2024 16:19:40 -0400 Subject: [PATCH 17/19] Remove drone file --- .drone.yml | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index d3ad89e..0000000 --- a/.drone.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: test -kind: pipeline - -steps: - - name: linting - image: docker.atomaka.com/mdformat - commands: - - mdformat --check _posts/ - - name: jekyll-build - image: ruby - commands: - - gem install bundler - - bundle install - - bundle exec jekyll build - -trigger: - branch: - exclude: master - event: push - ---- -name: deploy -kind: pipeline - -steps: - - name: jekyll-build - image: ruby - commands: - - gem install bundler - - bundle install - - bundle exec jekyll build - - name: docker-build - image: plugins/docker - settings: - pull_image: true - registry: docker.atomaka.com - repo: docker.atomaka.com/atomaka.com - 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: - - bash /boot/local/bin/update-atomaka.sh - -trigger: - event: tag -- 2.45.2 From a45b14d39d75c5aae6d203e8af2e82735bb60013 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 13 Jul 2024 16:41:59 -0400 Subject: [PATCH 18/19] Debug --- .gitea/workflows/deploy.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 372293b..34d1d23 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -19,6 +19,10 @@ jobs: bundle exec jekyll build - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - run: | + ls -la . + ls -la _site/ + pwd - name: Push image uses: docker/build-push-action@v6 with: -- 2.45.2 From aaddbeae7fc767cfbb0c7edd1913475c2dbe2629 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 13 Jul 2024 20:14:30 -0400 Subject: [PATCH 19/19] Provide path context over git hash --- .gitea/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 34d1d23..533b65a 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -26,6 +26,7 @@ jobs: - name: Push image uses: docker/build-push-action@v6 with: + context: . push: true tags: | docker.atomaka.com/atomaka.com:latest -- 2.45.2