-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (65 loc) · 2.12 KB
/
liquibase_rollback_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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: rollback_changes
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
workflow_dispatch:
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]
inputs:
tag:
description: 'Enter tag to rollback'
required: true
env:
LIQUIBASE_PRO_LICENSE_KEY: ${{ secrets.LIQUIBASE_PRO_LICENSE_KEY }}
LIQUIBASE_COMMAND_URL: ${{ secrets.LIQUIBASE_COMMAND_URL }}
LIQUIBASE_COMMAND_USERNAME: ${{ secrets.LIQUIBASE_COMMAND_USERNAME }}
LIQUIBASE_COMMAND_PASSWORD: ${{ secrets.LIQUIBASE_COMMAND_PASSWORD }}
LIQUIBASE_COMMAND_CHANGELOG_FILE: ${{ secrets.LIQUIBASE_COMMAND_CHANGELOG_FILE }}
LIQUIBASE_HUB_API_KEY: ${{ secrets.LIQUIBASE_HUB_API_KEY }}
jobs:
Build_Job:
runs-on: ubuntu-latest
environment:
name: DEV
steps:
- uses: actions/checkout@v2
- name: Rolling back DEV changes
uses: docker://liquibase/liquibase:snowflake
with:
args: rollback ${{ github.event.inputs.tag }}
- name: Runnig the History command
uses: docker://liquibase/liquibase:snowflake
with:
args: liquibase history
Test_Job:
needs: Build_Job
runs-on: ubuntu-latest
environment:
name: TEST
steps:
- uses: actions/checkout@v2
- name: Rolling back TEST changes
uses: docker://liquibase/liquibase:snowflake
with:
args: rollback ${{ github.event.inputs.tag }}
- name: Runnig the History command
uses: docker://liquibase/liquibase:snowflake
with:
args: liquibase history
Deploy_Prod_Job:
needs: Test_Job
runs-on: ubuntu-latest
environment:
name: PROD
steps:
- uses: actions/checkout@v2
- name: Rolling back PROD changes
uses: docker://liquibase/liquibase:snowflake
with:
args: rollback ${{ github.event.inputs.tag }}
- name: Runnig the History command
uses: docker://liquibase/liquibase:snowflake
with:
args: liquibase history