robdiciuccio commented on a change in pull request #13189:
URL: https://github.com/apache/superset/pull/13189#discussion_r578592057
##########
File path: .github/workflows/docker.yml
##########
@@ -24,3 +24,19 @@ jobs:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
.github/workflows/docker_build_push.sh
+
+ - name: Build ephemeral env image
+ if: github.event_name == 'pull_request'
+ run: |
+ mkdir -p ./build
+ echo ${{ github.sha }} > ./build/SHA
+ echo ${{ github.event.pull_request.number }} > ./build/PR-NUM
+ docker build --target ci -t ${{ github.sha }} -t "pr-${{
github.event.pull_request.number }}" .
+ docker save ${{ github.sha }} | gzip > ./build/${{ github.sha
}}.tar.gz
Review comment:
Since the `--target ci` build here is already using the cached layers
from the previous builds, there's not much of a gain in using those images
directly. We could embed both the PR num and SHA in the filename, but this felt
a bit cleaner, and wouldn't save any measurable time in the `workflow_run` step.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]