From c8d47141817b7236eee12eeb74f7e2c9330ef50a Mon Sep 17 00:00:00 2001 From: damien Date: Tue, 25 Feb 2025 15:53:00 +0000 Subject: [PATCH 01/13] Update .github/workflows/docker-build.yml --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index a235341..b435427 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -42,7 +42,7 @@ jobs: with: registry: ${{ github.server_url }}/${{ github.repository }}/packages username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITEA_TOKEN }} - name: Extract metadata for Docker id: meta @@ -61,7 +61,7 @@ jobs: id: semver uses: mathieudutour/github-tag-action@v6.1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITEA_TOKEN }} release_branches: main default_bump: patch dry_run: true From df0792c8406f1f615dfec26f8ef52ba10668d6d7 Mon Sep 17 00:00:00 2001 From: damien Date: Tue, 25 Feb 2025 16:40:55 +0000 Subject: [PATCH 02/13] Update .github/workflows/docker-build.yml --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index b435427..89355d9 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -42,7 +42,7 @@ jobs: with: registry: ${{ github.server_url }}/${{ github.repository }}/packages username: ${{ github.actor }} - password: ${{ secrets.GITEA_TOKEN }} + password: ${{ secrets.PACKAGE_TOKEN }} - name: Extract metadata for Docker id: meta @@ -61,7 +61,7 @@ jobs: id: semver uses: mathieudutour/github-tag-action@v6.1 with: - github_token: ${{ secrets.GITEA_TOKEN }} + github_token: ${{ secrets.PACKAGE_TOKEN }} release_branches: main default_bump: patch dry_run: true From 289654c9c87e6e9495e0c5ba94259b9570d6defa Mon Sep 17 00:00:00 2001 From: damien Date: Tue, 25 Feb 2025 17:07:25 +0000 Subject: [PATCH 03/13] Update .github/workflows/docker-build.yml --- .github/workflows/docker-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 89355d9..ba75ea4 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -13,8 +13,9 @@ jobs: build: runs-on: ubuntu-latest permissions: - contents: read + contents: write # Allows tagging and releasing packages: write + pull-requests: write # Allows reading PR info if needed steps: - name: Checkout repository From 0035a51c5caf34956d84edde1792482934bf1fcc Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 01:02:28 +0000 Subject: [PATCH 04/13] Update .github/workflows/docker-build.yml --- .github/workflows/docker-build.yml | 38 +++++++++--------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index ba75ea4..af013bc 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,16 +1,15 @@ name: Build and Push Docker Image on: - push: - branches: [ main ] - paths-ignore: - - '**.md' - pull_request: - branches: [ main ] workflow_dispatch: + inputs: + version: + description: 'Version to tag the image with (e.g., 1.0.0)' + required: true + type: string jobs: - build: + build-and-push: runs-on: ubuntu-latest permissions: contents: write # Allows tagging and releasing @@ -51,40 +50,25 @@ jobs: with: images: ${{ github.server_url }}/${{ github.repository }}/personal-website tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=ref,event=branch - type=ref,event=pr - type=sha - - - name: Determine version - id: semver - uses: mathieudutour/github-tag-action@v6.1 - with: - github_token: ${{ secrets.PACKAGE_TOKEN }} - release_branches: main - default_bump: patch - dry_run: true + type=raw,value=${{ github.event.inputs.version }} - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: true tags: | ${{ github.server_url }}/${{ github.repository }}/personal-website:latest - ${{ github.server_url }}/${{ github.repository }}/personal-website:${{ steps.semver.outputs.new_tag }} + ${{ github.server_url }}/${{ github.repository }}/personal-website:${{ github.event.inputs.version }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - name: Create GitHub Release - if: github.event_name != 'pull_request' uses: mathieudutour/github-tag-action@v6.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: ${{ github.event.inputs.version }} release_branches: main - default_bump: patch create_annotated_tag: true - tag_prefix: v \ No newline at end of file + tag_prefix: v From 2121130c104aa30a764cfba8529a03b4f29de482 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 01:02:38 +0000 Subject: [PATCH 05/13] Update .github/workflows/release.yaml --- .github/workflows/{docker-build.yml => release.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{docker-build.yml => release.yaml} (100%) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/release.yaml similarity index 100% rename from .github/workflows/docker-build.yml rename to .github/workflows/release.yaml From cca520a3c79ef7655d293f39b88046e65af31fb3 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 01:03:07 +0000 Subject: [PATCH 06/13] Add .github/workflows/build.yaml --- .github/workflows/build.yaml | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..367c547 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,63 @@ +name: Build Docker Image + +on: + push: + branches: [ main ] + paths-ignore: + - '**.md' + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test || true + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: local/personal-website + tags: | + type=ref,event=branch + type=ref,event=pr + type=sha + + - name: Build Docker image (no push) + uses: docker/build-push-action@v4 + with: + context: . + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + outputs: type=docker,dest=/tmp/image.tar + + - name: Save Docker image as artifact + uses: actions/upload-artifact@v3 + with: + name: docker-image + path: /tmp/image.tar + retention-days: 1 From bdead51c7ca6e9d5a04a6916c417e5200b90d9a0 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 04:20:22 +0000 Subject: [PATCH 07/13] Update src/components/SocialIcons.tsx --- src/components/SocialIcons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SocialIcons.tsx b/src/components/SocialIcons.tsx index 3a50c0f..e99b830 100644 --- a/src/components/SocialIcons.tsx +++ b/src/components/SocialIcons.tsx @@ -89,7 +89,7 @@ const defaultSocialLinks: SocialLink[] = [ }, { name: 'AI', - url: 'https://ai.d4m13n.dev', + url: 'https://chat.d4m13n.dev', icon: AIIcon, }, ]; From 032e35256a4aa32279c447573fab2cf5a4577261 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 04:24:10 +0000 Subject: [PATCH 08/13] Update .github/workflows/build.yaml --- .github/workflows/build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 367c547..7ed95b5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ name: Build Docker Image on: push: branches: [ main ] - paths-ignore: + paths_ignore: - '**.md' pull_request: branches: [ main ] @@ -38,7 +38,8 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: local/personal-website + # Updated image name to reflect your Gitea registry + images: git.d4m13n.dev/damien/personal-website tags: | type=ref,event=branch type=ref,event=pr @@ -60,4 +61,4 @@ jobs: with: name: docker-image path: /tmp/image.tar - retention-days: 1 + retention-days: 1 \ No newline at end of file From 4825294868ee5f171f54602af8f534a89d17beb3 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 04:28:21 +0000 Subject: [PATCH 09/13] Update .github/workflows/build.yaml --- .github/workflows/build.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7ed95b5..97b3d9d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,16 +1,16 @@ -name: Build Docker Image +name: Build and Push Docker Image to Gitea Registry on: push: branches: [ main ] - paths_ignore: + paths-ignore: - '**.md' pull_request: branches: [ main ] workflow_dispatch: jobs: - build: + build-and-push: runs-on: ubuntu-latest steps: @@ -34,31 +34,31 @@ jobs: - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Login to Gitea Container Registry + uses: docker/login-action@v2 + with: + registry: git.d4m13n.dev + username: ${{ secrets.GITEA_REGISTRY_USER }} # Store your Gitea registry username as a secret + password: ${{ secrets.GITEA_REGISTRY_TOKEN }} # Store your Gitea registry token/password as a secret + - name: Extract metadata for Docker id: meta uses: docker/metadata-action@v4 with: - # Updated image name to reflect your Gitea registry + # Full image name including Gitea Registry URL images: git.d4m13n.dev/damien/personal-website tags: | type=ref,event=branch type=ref,event=pr type=sha - - name: Build Docker image (no push) + - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . - push: false + push: false # Enable push to registry tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - outputs: type=docker,dest=/tmp/image.tar - - name: Save Docker image as artifact - uses: actions/upload-artifact@v3 - with: - name: docker-image - path: /tmp/image.tar - retention-days: 1 \ No newline at end of file From 76492ad7cb3cabab2a4d6498cb947e53e11b0deb Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 04:28:31 +0000 Subject: [PATCH 10/13] Update .github/workflows/release.yaml --- .github/workflows/release.yaml | 46 +++++++++++++--------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index af013bc..aceda4c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,20 +1,17 @@ -name: Build and Push Docker Image +name: Build and Push Docker Image to Gitea Registry on: + push: + branches: [ main ] + paths-ignore: + - '**.md' + pull_request: + branches: [ main ] workflow_dispatch: - inputs: - version: - description: 'Version to tag the image with (e.g., 1.0.0)' - required: true - type: string jobs: build-and-push: runs-on: ubuntu-latest - permissions: - contents: write # Allows tagging and releasing - packages: write - pull-requests: write # Allows reading PR info if needed steps: - name: Checkout repository @@ -37,38 +34,31 @@ jobs: - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Log in to Container Registry + - name: Login to Gitea Container Registry uses: docker/login-action@v2 with: - registry: ${{ github.server_url }}/${{ github.repository }}/packages - username: ${{ github.actor }} - password: ${{ secrets.PACKAGE_TOKEN }} + registry: git.d4m13n.dev + username: ${{ secrets.GITEA_REGISTRY_USER }} # Store your Gitea registry username as a secret + password: ${{ secrets.GITEA_REGISTRY_TOKEN }} # Store your Gitea registry token/password as a secret - name: Extract metadata for Docker id: meta uses: docker/metadata-action@v4 with: - images: ${{ github.server_url }}/${{ github.repository }}/personal-website + # Full image name including Gitea Registry URL + images: git.d4m13n.dev/damien/personal-website tags: | - type=raw,value=${{ github.event.inputs.version }} + type=ref,event=branch + type=ref,event=pr + type=sha - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . - push: true - tags: | - ${{ github.server_url }}/${{ github.repository }}/personal-website:latest - ${{ github.server_url }}/${{ github.repository }}/personal-website:${{ github.event.inputs.version }} + push: true # Enable push to registry + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - - name: Create GitHub Release - uses: mathieudutour/github-tag-action@v6.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - custom_tag: ${{ github.event.inputs.version }} - release_branches: main - create_annotated_tag: true - tag_prefix: v From fcb7da3cc72b5e6da75991025e87e943cc0787f4 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 05:38:31 +0000 Subject: [PATCH 11/13] Update .github/workflows/release.yaml --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index aceda4c..ddaebbd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,8 +38,8 @@ jobs: uses: docker/login-action@v2 with: registry: git.d4m13n.dev - username: ${{ secrets.GITEA_REGISTRY_USER }} # Store your Gitea registry username as a secret - password: ${{ secrets.GITEA_REGISTRY_TOKEN }} # Store your Gitea registry token/password as a secret + username: damienostler1@outlook.com # Store your Gitea registry username as a secret + password: ${{ secrets.PACKAGE_TOKEN }} # Store your Gitea registry token/password as a secret - name: Extract metadata for Docker id: meta From f453fe26d6cc5f7dc6c02bf43d3e132a916bbdaf Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 05:38:46 +0000 Subject: [PATCH 12/13] Update .github/workflows/build.yaml --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 97b3d9d..fd811c8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,8 +38,8 @@ jobs: uses: docker/login-action@v2 with: registry: git.d4m13n.dev - username: ${{ secrets.GITEA_REGISTRY_USER }} # Store your Gitea registry username as a secret - password: ${{ secrets.GITEA_REGISTRY_TOKEN }} # Store your Gitea registry token/password as a secret + username: damienostler1@outlook.com # Store your Gitea registry username as a secret + password: ${{ secrets.PACKAGE_TOKEN }} # Store your Gitea registry token/password as a secret - name: Extract metadata for Docker id: meta From 3abbe9e6c2b70953e2ccec0f7d3648b22e704523 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 27 Feb 2025 05:39:28 +0000 Subject: [PATCH 13/13] Update .github/workflows/release.yaml --- .github/workflows/release.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ddaebbd..b92f7b8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,12 +1,6 @@ name: Build and Push Docker Image to Gitea Registry on: - push: - branches: [ main ] - paths-ignore: - - '**.md' - pull_request: - branches: [ main ] workflow_dispatch: jobs: