Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,16 @@ jobs:
- name: Build Docker container
shell: sh
run: |
docker build --pull --no-cache --force-rm .
docker build --pull --no-cache --tag built-manual-image .
docker create --name built-manual-container built-manual-image
docker cp built-manual-container:/usr/local/apache2/htdocs "$RUNNER_TEMP/htdocs"
docker container rm --force --volumes built-manual-container
Comment on lines +30 to +32

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can avoid keeping the temporary container across multiple commands by replacing this with something like:

docker run --rm built-manual-image tar -C /usr/local/apache2 -c htdocs | tar -C "$RUNNER_TEMP" -x

docker image rm --force built-manual-image
Comment on lines +29 to +33

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just occurred to me that this will be a race condition if multiple PR builds end up getting assigned to the same runner. Maybe the container name and image should be unique for the PR?


- name: Upload built manual HTTP root
uses: actions/upload-artifact@v4
with:
name: built-manual
path: ${{ runner.temp }}//htdocs
retention-days: 1