From 923c5eebaeafd1df2844b2fc78e2f514ba0735bd Mon Sep 17 00:00:00 2001 From: Tine Date: Sun, 18 Feb 2024 10:38:14 +0100 Subject: [PATCH] ci(deploy): trying to fix deploy --- .github/workflows/build.yaml | 13 +++++++++++++ .github/workflows/deploy.yaml | 16 ---------------- build/Dockerfile | 2 +- 3 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d8d77f8..593056f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -54,3 +54,16 @@ jobs: platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install devbox + uses: jetpack-io/devbox-install-action@v0.6.0 + + - run: devbox run -- just deploy + if : github.event_name == 'push' && github.ref == 'refs/heads/main' + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index a7b653e..0000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Deploy -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: superfly/flyctl-actions/setup-flyctl@1.5 - - run: flyctl deploy -c deploy/fly.toml --remote-only - env: - FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/build/Dockerfile b/build/Dockerfile index a7159e7..4e69b42 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -16,7 +16,7 @@ RUN CGO_ENABLED=1 GOOS=linux go build -o /bin/zdravko cmd/zdravko/main.go ### # Final production -FROM debian:12 as production +FROM gcr.io/distroless/base-debian12:nonroot as production COPY --from=builder /bin/zdravko /bin/zdravko COPY LICENSE /LICENSE COPY README.md /README.md