-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.17 KB
/
docker-image.yml
File metadata and controls
39 lines (34 loc) · 1.17 KB
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
name: Docker Image CI
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Set image postfix
run: echo "DOCKER_IMAGE_POSTFIX=$(date +%Y-%m-%d_%s)" >> "$GITHUB_ENV"
- name: Checkout the repo
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push server image
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:src"
file: PodLoad.Server/Dockerfile
push: true
tags: ghcr.io/rumkit/pod-load-simulator-server:${{ env.DOCKER_IMAGE_POSTFIX }},ghcr.io/rumkit/pod-load-simulator-server:latest
- name: Build and push client image
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:src"
file: PodLoad.Client/Dockerfile
push: true
tags: ghcr.io/rumkit/pod-load-simulator-client:${{ env.DOCKER_IMAGE_POSTFIX }},ghcr.io/rumkit/pod-load-simulator-client:latest