From 98eb1083ebb569a83f833c3a87630b1d9d88988f Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Tue, 1 Sep 2026 13:58:08 +0000 Subject: [PATCH] Add image deployment workflow --- .github/workflows/publish-image.yml | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/publish-image.yml diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml new file mode 100644 index 0000000..1417bd8 --- /dev/null +++ b/.github/workflows/publish-image.yml @@ -0,0 +1,47 @@ +name: "Publish image" + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Login to Gitea Container Registry + uses: docker/login-action@v4 + with: + registry: gitea.bchen.dev + username: ${{ github.actor }} + password: ${{ secrets.PAT }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: . + push: true + tags: gitea.bchen.dev/${{ github.actor }}/project-inter-server:latest + + - name: Set up Tailscale + uses: tailscale/github-action@v4 + with: + oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} + oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} + tags: tag:ci + use-cache: false + tailscaled-args: --tun=userspace-networking --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055 + + - name: Deploy to Coolify + run: | + curl --request POST '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'