Skip to content

Workflow file for this run

name: Build and Publish Docker Image
on:
push:
branches:
- 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:
password: ${{ secrets.DOCKERHUB_USER }}
username: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/buildx-action@v2
with:
args: |
--platform linux/amd64,linux/arm64
--push
-t myusername/myimage:latest
-t myusername/myimage:${{ env.VERSION }}
.