Create new Docker publishing workflow. #282
Conversation
So the infrastructure for this works out to be pretty straightforward, and seems to work pretty well at getting Docker images from master up. The trouble is that apparently GitHub Package Registry has an undocumented requirement that users log in to +@anpaz-msft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor comments, but overall looks great.
Dockerfile
Outdated
FROM mcr.microsoft.com/quantum/iqsharp-base:0.10.1912.501 | ||
# This uses the latest Docker image built from the samples repository, | ||
# defined by the Dockerfile in Build/images/samples. | ||
FROM docker.pkg.github.com/microsoft/quantum/samples:latest | ||
|
||
# Mark that this Dockerfile is used with the samples repository. | ||
ENV IQSHARP_HOSTING_ENV=SAMPLES_DOCKERFILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should have different values for both, maybe this one should be SAMPLES_HOSTED?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, easy enough to change, yeah.
.github/workflows/main.yml
Outdated
- name: Build and push Docker image | ||
run: | | ||
$Now = [DateTime]::Now; | ||
$ImageTag = "{0}{1:d2}{2:d2}.{3:d2}{4:d2}.{5:d2}{6:d4}" -f $Now.Year, $Now.Month, $Now.Day, $Now.Hour, $Now.Minute, $Now.Second, $Now.Millisecond |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be better to use the commit id?
…ft/Quantum into cgranade/prebuild-docker
This PR sets up a new GitHub Action to prebuild the Docker image for the samples repo and publish it to the packages feed for this repo.