Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Docker Image | |
on: | |
push: | |
branches: | |
- master | |
- staging | |
- feature/NU-1740 | |
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 . |