ci: change tag to version for e2e input

This commit is contained in:
Nicolas Meienberger 2023-08-24 19:20:37 +02:00 committed by Nicolas Meienberger
parent e65461b146
commit 7cb54ae341
2 changed files with 18 additions and 6 deletions

View file

@ -151,4 +151,4 @@ jobs:
uses: './.github/workflows/e2e.yml'
secrets: inherit
with:
tag: ${{ needs.create-tag.outputs.tagname }}
version: ${{ needs.create-tag.outputs.tagname }}

View file

@ -3,12 +3,14 @@ name: E2E Tests
on:
workflow_call:
inputs:
tag:
version:
required: true
type: string
description: 'Version to test (e.g. v1.6.0-beta.1)'
workflow_dispatch:
inputs:
tag:
version:
required: true
type: string
description: 'Version to test (e.g. v1.6.0-beta.1)'
@ -68,18 +70,28 @@ jobs:
- name: Wait 1 minute for Droplet to be ready
run: sleep 60
- name: Create docker group on Droplet
uses: fifsky/ssh-action@master
with:
command: |
groupadd docker
usermod -aG docker root
host: ${{ steps.get-droplet-ip.outputs.droplet_ip }}
user: root
key: ${{ secrets.SSH_KEY }}
- name: Deploy app to Droplet
uses: fifsky/ssh-action@master
with:
command: |
echo 'Downloading install script from GitHub'
curl -s https://raw.githubusercontent.com/meienberger/runtipi/${{ github.event.inputs.tag }}/scripts/install.sh > install.sh
curl -s https://raw.githubusercontent.com/meienberger/runtipi/${{ inputs.version }}/scripts/install.sh > install.sh
chmod +x install.sh
echo 'Running install script'
./install.sh --version ${{ github.event.inputs.tag }}
./install.sh --version ${{ inputs.version }}
echo 'App deployed'
host: ${{ steps.get-droplet-ip.outputs.droplet_ip }}
user: root
user: root # TODO: use non-root user
key: ${{ secrets.SSH_KEY }}
e2e: