-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 983 Bytes
/
publish.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
name: Build and Publish Docker Image
on:
push:
branches:
- master
jobs:
build:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Read version from file
id: get_version
run: |
VERSION=$(grep LIBRARY_DOCKER_IMAGE_VERSION version | cut -d'=' -f2)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Docker images
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag touk/nussknacker-example-scenarios-library:latest \
--tag touk/nussknacker-example-scenarios-library:${{ env.VERSION }} \
--push .