ci(deploy): trying to fix deploy

This commit is contained in:
Tine 2024-02-18 10:38:14 +01:00
parent ad5c0987e8
commit 923c5eebae
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw
3 changed files with 14 additions and 17 deletions

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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