Skip to content

Commit 3a7ae4e

Browse files
Fix main.yml: syntax errors, add mysql service container, add latest Docker tag
Co-authored-by: delicatacurtis <247246500+delicatacurtis@users.noreply.github.com>
1 parent f99aeab commit 3a7ae4e

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.github/workflows/main.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,42 @@ jobs:
1717
docker:
1818
if: github.event_name == 'push'
1919
runs-on: ubuntu-latest
20+
21+
services:
22+
mysql:
23+
image: mysql:8.0
24+
env:
25+
MYSQL_ROOT_PASSWORD: root
26+
MYSQL_DATABASE: liberu
27+
ports:
28+
- 3306:3306
29+
options: >-
30+
--health-cmd="mysqladmin ping"
31+
--health-interval=10s
32+
--health-timeout=5s
33+
--health-retries=3
34+
2035
steps:
21-
-
22-
name: Checkout
36+
- name: Checkout
2337
uses: actions/checkout@v4
2438

25-
-
26-
name: Login to Docker Hub
39+
- name: Login to Docker Hub
2740
uses: docker/login-action@v3
2841
with:
2942
username: ${{ secrets.DOCKERHUB_USERNAME }}
3043
password: ${{ secrets.DOCKERHUB_TOKEN }}
3144

32-
-
33-
name: Extract metadata (tags, labels) for Docker
45+
- name: Extract metadata (tags, labels) for Docker
3446
id: meta
3547
uses: docker/metadata-action@v5
3648
with:
3749
images: liberu/genealogy
50+
flavor: |
51+
latest=true
3852
39-
-
40-
# Setting up Docker Buildx with docker-container driver is required
41-
# at the moment to be able to use a subdirectory with Git context
42-
name: Set up Docker Buildx
53+
# Setting up Docker Buildx with docker-container driver is required
54+
# at the moment to be able to use a subdirectory with Git context
55+
- name: Set up Docker Buildx
4356
uses: docker/setup-buildx-action@v3
4457

4558
- name: Cache Docker layers

0 commit comments

Comments
 (0)