Skip to content

Update dockerfile

Update dockerfile #59

Workflow file for this run

name: build
# Build and test the NautilusTrader example data image
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
# https://github.com/docker/setup-qemu-action
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Set up Docker Buildx
# https://github.com/docker/setup-buildx-action
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Login to GHCR
# https://github.com/docker/login-action
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Get branch name
id: branch-name
run: |
echo "current_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- name: image name
run: echo ghcr.io/${{ github.repository }}:${{ steps.branch-name.outputs.current_branch }}
- name: Build backend
id: docker_build
# https://github.com/docker/build-push-action
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
file: "Dockerfile"
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.branch-name.outputs.current_branch }}
cache-from: type=gha
cache-to: type=gha
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}