-
Notifications
You must be signed in to change notification settings - Fork 2
189 lines (186 loc) · 7.33 KB
/
Daily-checklist.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: Wordpress
on:
schedule:
- cron: '00 02 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Wordpress-AMD64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image wordpress latest
run: docker-compose -f "docker-compose.yml" up -d --build
env:
MARIADB_VERSION: 10.7
APP_CODE_PATH_HOST: /tmp/wordpress
DB_NAME: test
DB_USER: admin
DB_PASSWORD: password
DB_ROOT_PASSWORD: password
DATA_PATH_HOST: /tmp/db
USER_ID: "0"
GROUP_ID: "0"
- name: PHP version check
run : docker exec wordpress_wordpress_1 php -v
- name: Mysql Driver check
run: docker exec wordpress_wordpress_1 php -m | grep mysqli
- name: Wordpress CLI check
run: docker exec wordpress_wordpress_1 wp --info | grep WP-CLI
- name: Web site Test
run: |
sleep 50s
sudo curl -I --http2 http://localhost:44181/wp-admin/install.php
- name: Verify MariaDB running from host, create Database and show Database
run: |
while ! docker exec wordpress_mysql_1 mysqladmin --user=root --password=password --host "mysql" ping --silent &> /dev/null ; do
echo "Waiting for database connection..."
sleep 2
done
- name: Check MariaDB version
run: docker exec wordpress_mysql_1 mysql -uroot -ppassword -e "SHOW VARIABLES LIKE '%version%';"
- name: Verify MariaDB database from user
run: docker exec wordpress_mysql_1 mysql -uadmin -ppassword -e "SHOW DATABASES"
- name: Create a Database
run: docker exec wordpress_mysql_1 mysql -uroot -ppassword -e "CREATE DATABASE deckapp"
- name: Verify Database create or not
run: docker exec wordpress_mysql_1 mysql -uroot -ppassword -e "SHOW DATABASES"
- name: Destroy Container and file
run: |
docker-compose down
echo "y" | docker system prune -a
echo "y" | docker image prune -a
echo "y" | docker volume prune
sudo rm -rf /tmp/wordpress
sudo rm -rf /tmp/db
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
Wordpress-ARM64:
runs-on: ubuntu-22.04
name: Wordpress-ARM64
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu22.04
run: |
uname -a
echo ::set-output name=uname::$(uname -a)
- name: Get the output
run: |
echo "The uname output was ${{ steps.runcmd.outputs.uname }}"
- name: Build the Docker image wordpress latest
run: docker-compose -f "docker-compose.yml" up -d --build
env:
MARIADB_VERSION: 10.7
APP_CODE_PATH_HOST: /tmp/wordpress
DB_NAME: test
DB_USER: admin
DB_PASSWORD: password
DB_ROOT_PASSWORD: password
DATA_PATH_HOST: /tmp/db
USER_ID: "0"
GROUP_ID: "0"
- name: PHP version check
run : docker exec wordpress_wordpress_1 php -v
- name: Mysql Driver check
run: docker exec wordpress_wordpress_1 php -m | grep mysqli
- name: Wordpress CLI check
run: docker exec wordpress_wordpress_1 wp --info | grep WP-CLI
- name: Web site Test
run: |
sleep 50s
sudo curl -I --http2 http://localhost:44181/wp-admin/install.php
- name: Verify MariaDB running from host, create Database and show Database
run: |
while ! docker exec wordpress_mysql_1 mysqladmin --user=root --password=password --host "mysql" ping --silent &> /dev/null ; do
echo "Waiting for database connection..."
sleep 2
done
- name: Check MariaDB version
run: docker exec wordpress_mysql_1 mysql -uroot -ppassword -e "SHOW VARIABLES LIKE '%version%';"
- name: Verify MariaDB database from user
run: docker exec wordpress_mysql_1 mysql -uadmin -ppassword -e "SHOW DATABASES"
- name: Create a Database
run: docker exec wordpress_mysql_1 mysql -uroot -ppassword -e "CREATE DATABASE deckapp"
- name: Verify Database create or not
run: docker exec wordpress_mysql_1 mysql -uroot -ppassword -e "SHOW DATABASES"
- name: Destroy Container and file
run: |
docker-compose down
echo "y" | docker system prune -a
echo "y" | docker image prune -a
echo "y" | docker volume prune
sudo rm -rf /tmp/wordpress
sudo rm -rf /tmp/db
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}