-
Notifications
You must be signed in to change notification settings - Fork 40
56 lines (40 loc) · 1.85 KB
/
grate-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This is a basic workflow to help you get started with Actions
name: Example grate workflow
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
dryrun:
name: Dry run
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Download grate
run: curl -sL https://github.com/erikbra/grate/releases/download/1.6.1/grate_1.6.1-1_amd64.deb -o /tmp/grate_1.6.1-1_amd64.deb
- name: Install grate
run: sudo dpkg -i /tmp/grate_1.6.1-1_amd64.deb
- name: Verify grate installation
run: grate --help
- name: Dryrun
run: grate --dryrun --databasetype sqlite --connectionstring "Data Source=devops-db.db" --files $GITHUB_WORKSPACE/examples/scripts/sqlite
perform-deploy:
name: Perform the actual deploy
# This is the way manual approvals are handled in Github actions - see on your 'Settings' tab
environment: 'example-environment'
runs-on: ubuntu-latest
# Makes it not run parallel to the dryrun step
needs: dryrun
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Download grate
run: curl -sL https://github.com/erikbra/grate/releases/download/1.6.1/grate_1.6.1-1_amd64.deb -o /tmp/grate_1.6.1-1_amd64.deb
- name: Install grate
run: sudo dpkg -i /tmp/grate_1.6.1-1_amd64.deb
- name: Verify grate installation
run: grate --help
- name: Deploy
run: grate --databasetype sqlite --connectionstring "Data Source=devops-db.db" --files $GITHUB_WORKSPACE/examples/scripts/sqlite