From 44b8f3a5116f87cc378c7c5b103a7f2cc837c894 Mon Sep 17 00:00:00 2001 From: Arthur Zapparoli Date: Wed, 12 Jul 2023 11:10:29 +0200 Subject: [PATCH] feat: adds fly deploy github action --- .github/renovate.json5 | 6 ++++++ .github/workflows/fly-deploy.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/fly-deploy.yaml diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 16e5412..d2d2d9e 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -29,6 +29,12 @@ "matchStrings": [ "datasource=(?.*?) depName=(?.*?)\\sARG .*?_VERSION=(?v.*)\\s" ] + }, + { + "fileMatch": ["^\\.github\\/workflows\\/fly-deploy\\.yaml$"], + "matchStrings": [ + "datasource=(?.*?) depName=(?.*?)\\s.*_VERSION:\\s?(?v.*)\\s" + ] } ] } diff --git a/.github/workflows/fly-deploy.yaml b/.github/workflows/fly-deploy.yaml new file mode 100644 index 0000000..82ead29 --- /dev/null +++ b/.github/workflows/fly-deploy.yaml @@ -0,0 +1,28 @@ +name: Deploy to Fly + +on: + push: + branches: + - main + +jobs: + deploy: + name: Deploy app + runs-on: ubuntu-latest + env: + # renovate: datasource=github-releases depName=go-task/task + TASK_VERSION: v3.27.1 + steps: + - uses: actions/checkout@v2 + - uses: superfly/flyctl-actions/setup-flyctl@master + with: + version: 0.1.54 + - name: Download go-task + run: curl -O https://github.com/go-task/task/releases/download/$TASK_VERSION/task_linux_amd64.deb + - name: Install go-task + run: sudo apt install -y ./task_linux_amd64.deb + - name: Deploy app + run: fly deploy --remote-only -a $FLY_APP + env: + FLY_APP: ${{ secrets.FLY_APP }} + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}