Skip to content

Commit b8aeac6

Browse files
Update workflows to use docker make targets
1 parent d6c8a4b commit b8aeac6

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
jobs:
1313
build-and-push:
1414
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
component: [server, client]
1815

1916
steps:
2017
- name: Checkout code
@@ -31,12 +28,10 @@ jobs:
3128
password: ${{ secrets.GITHUB_TOKEN }}
3229

3330
- name: Build and tag the Docker image
34-
run: |
35-
docker build . -f Dockerfile.${{ matrix.component }} \
36-
-t ghcr.io/${{ github.repository }}/${{ matrix.component }}:${{ github.sha }} \
37-
-t ghcr.io/${{ github.repository }}/${{ matrix.component }}:latest
31+
run: make build-images
32+
33+
- name: tag images
34+
run: make tag-images
3835

3936
- name: Push Docker images to GitHub Packages
40-
run: |
41-
docker push ghcr.io/${{ github.repository }}/${{ matrix.component }}:${{ github.sha }}
42-
docker push ghcr.io/${{ github.repository }}/${{ matrix.component }}:latest
37+
run: make push-images

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,15 @@ jobs:
1919
- name: Run tests
2020
run: make test
2121

22+
docker:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v2
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v1
31+
32+
- name: Build and tag the Docker image
33+
run: make build-images

0 commit comments

Comments
 (0)