From 31fb8d380bc1872492363de44019e0126ae5ba1c Mon Sep 17 00:00:00 2001 From: bagas Date: Sun, 22 Jun 2025 16:42:09 +0700 Subject: [PATCH 1/5] update: add gitea action --- .gitea/workflows/build.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..40a0b4f --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,48 @@ +name: Docker Build and Push + +on: + push: + branches: + - main + - staging + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + registry: git.fossy.my.id + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image for main + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/filekeeper:latest + platforms: linux/amd64,linux/arm64 + if: github.ref == 'refs/heads/main' + + - name: Build and push Docker image for staging + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/filekeeper:staging + platforms: linux/amd64,linux/arm64 + if: github.ref == 'refs/heads/staging' \ No newline at end of file From 867481bd3d1b2680f60e815b8f0ee980e88fabac Mon Sep 17 00:00:00 2001 From: bagas Date: Sun, 22 Jun 2025 17:35:48 +0700 Subject: [PATCH 2/5] update: add gitea action --- .gitea/workflows/build.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 40a0b4f..aa4d52a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -12,16 +12,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: git.fossy.my.id username: ${{ secrets.DOCKER_USERNAME }} @@ -33,7 +30,7 @@ jobs: context: . push: true tags: | - git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/filekeeper:latest + git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:latest platforms: linux/amd64,linux/arm64 if: github.ref == 'refs/heads/main' @@ -43,6 +40,6 @@ jobs: context: . push: true tags: | - git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/filekeeper:staging + git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:staging platforms: linux/amd64,linux/arm64 if: github.ref == 'refs/heads/staging' \ No newline at end of file From 8dd4b4b173413e3c59d89811eb1dc944178a1f53 Mon Sep 17 00:00:00 2001 From: bagas Date: Sun, 22 Jun 2025 17:39:00 +0700 Subject: [PATCH 3/5] update: add gitea action --- go.mod | 6 +----- go.sum | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 853ca78..e39af7a 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,4 @@ require ( golang.org/x/net v0.33.0 ) -require ( - github.com/google/uuid v1.6.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/text v0.21.0 // indirect -) +require golang.org/x/sys v0.29.0 // indirect diff --git a/go.sum b/go.sum index 03fa8cb..6f93cb4 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/a-h/templ v0.3.833 h1:L/KOk/0VvVTBegtE0fp2RJQiBm7/52Zxv5fqlEHiQUU= github.com/a-h/templ v0.3.833/go.mod h1:cAu4AiZhtJfBjMY0HASlyzvkrtjnHWPeEsyGK2YYmfk= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= @@ -14,5 +12,3 @@ golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= From 692e9511f8c79e7085e742e6ca6ab86629590418 Mon Sep 17 00:00:00 2001 From: bagas Date: Sun, 22 Jun 2025 17:41:42 +0700 Subject: [PATCH 4/5] update: add gitea action --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e39af7a..0d8b7b6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module tunnel_pls -go 1.23 +go 1.24.4 require ( github.com/a-h/templ v0.3.833 From 82c112984e659ebc79dd40bd14dd41132eb94bd9 Mon Sep 17 00:00:00 2001 From: bagas Date: Sun, 22 Jun 2025 17:47:09 +0700 Subject: [PATCH 5/5] update: add gitea action --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bcf7752..bdd3b33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.1-alpine3.20 AS go_builder +FROM golang:1.24.4-alpine AS go_builder WORKDIR /src COPY . .