From dadf8382f4829b044da28e1827940de11bbf53bb Mon Sep 17 00:00:00 2001 From: Jason Tevnan Date: Mon, 30 Jun 2025 22:13:13 +0200 Subject: [PATCH 1/5] test branches --- .gitea/workflows/test_and_build.yml | 48 +++++++++++++++++++++++++++++ Dockerfile | 1 + 2 files changed, 49 insertions(+) create mode 100644 .gitea/workflows/test_and_build.yml create mode 100644 Dockerfile diff --git a/.gitea/workflows/test_and_build.yml b/.gitea/workflows/test_and_build.yml new file mode 100644 index 0000000..aa57bb0 --- /dev/null +++ b/.gitea/workflows/test_and_build.yml @@ -0,0 +1,48 @@ +name: Build, Test and Register Docker Images + +on: + push: + branches: + - main + - production + pull_request: + types: [closed] + branches: + - production + +jobs: + build-publish-frontend: + runs-on: coc + container: + image: docker + steps: + - name: Login to Registry + uses: docker/login-action@v3 + with: + registry: cocgit.scalingdone.com + username: ${{ secrets.RUNNER_REGISTRY_USERNAME }} + password: ${{ secrets.RUNNER_REGISTRY_PASSWORD }} + + - name: Build Docker image + uses: docker/build-push-action@v6 + with: + context: "{{defaultContext}}:test" + tags: | + cocgit.scalingdone.com/jat/branchingtest/appimage:latest + ${{ github.ref == 'refs/heads/production' && format('cocgit.scalingdone.com/jat/branchingtest/appimage:{0}', github.sha) || '' }} + push: true + + reload-staging: + if: github.ref == 'refs/heads/production' + runs-on: coc + container: + image: curlimages/curl + networks: + - coc + needs: + - build-publish-frontend + steps: + - name: Trigger Watchtower to reload docker image + run: | + echo "hi" + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b09b037 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +FROM alpine:latest -- 2.40.1 From 5a369e823d3e51cbcb18232325f73382987a2e7b Mon Sep 17 00:00:00 2001 From: Jason Tevnan Date: Mon, 30 Jun 2025 20:14:16 +0000 Subject: [PATCH 2/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e69de29..88d050b 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +main \ No newline at end of file -- 2.40.1 From 1bf339304e91fc8c7e4a216d96ff326de4352042 Mon Sep 17 00:00:00 2001 From: Jason Tevnan Date: Mon, 30 Jun 2025 20:19:18 +0000 Subject: [PATCH 3/5] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 88d050b..e69de29 100644 --- a/README.md +++ b/README.md @@ -1 +0,0 @@ -main \ No newline at end of file -- 2.40.1 From 3edd1db8d456811b9b5add783a7905cadfb91ef7 Mon Sep 17 00:00:00 2001 From: Jason Tevnan Date: Mon, 30 Jun 2025 22:21:32 +0200 Subject: [PATCH 4/5] node dep --- .gitea/workflows/test_and_build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/test_and_build.yml b/.gitea/workflows/test_and_build.yml index aa57bb0..aaf64f5 100644 --- a/.gitea/workflows/test_and_build.yml +++ b/.gitea/workflows/test_and_build.yml @@ -16,6 +16,8 @@ jobs: container: image: docker steps: + - name: Install node + run: apk add nodejs - name: Login to Registry uses: docker/login-action@v3 with: -- 2.40.1 From c876d1f9c3a8a7662b94ff37bd919e1cfee3a4b6 Mon Sep 17 00:00:00 2001 From: Jason Tevnan Date: Mon, 30 Jun 2025 22:38:26 +0200 Subject: [PATCH 5/5] no context --- .gitea/workflows/test_and_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/test_and_build.yml b/.gitea/workflows/test_and_build.yml index aaf64f5..f198717 100644 --- a/.gitea/workflows/test_and_build.yml +++ b/.gitea/workflows/test_and_build.yml @@ -28,7 +28,6 @@ jobs: - name: Build Docker image uses: docker/build-push-action@v6 with: - context: "{{defaultContext}}:test" tags: | cocgit.scalingdone.com/jat/branchingtest/appimage:latest ${{ github.ref == 'refs/heads/production' && format('cocgit.scalingdone.com/jat/branchingtest/appimage:{0}', github.sha) || '' }} -- 2.40.1