forked from huggingface/peft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: [
CI
/ Docker
]: Create a workflow to temporarly build docker …
…images in case dockerfiles are modified (huggingface#1481) * test workflow * Update Dockerfile * build docker images * Update .github/workflows/test-docker-build.yml * Update .github/workflows/test-docker-build.yml Co-authored-by: Guillaume LEGENDRE <glegendre01@gmail.com> --------- Co-authored-by: Guillaume LEGENDRE <glegendre01@gmail.com>
- Loading branch information
1 parent
cbafd66
commit cb6ab59
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Test Docker images (scheduled) | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
# Run only when DockerFile files are modified | ||
- "docker/**" | ||
|
||
concurrency: | ||
group: docker-image-builds | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
name: "Build all modified docker images" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@3f54ebb830831fc121d3263c1857cfbdc310cdb9 #v42 | ||
with: | ||
files: docker/** | ||
- name: Run step if only the files listed above change | ||
if: steps.changed-files.outputs.only_changed == 'true' | ||
env: | ||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files}} | ||
run: | | ||
for file in ${CHANGED_FILES}; do | ||
echo "$file was changed" | ||
done | ||
- name: Build Docker images | ||
strategy: | ||
matrix: | ||
docker-file: ${{ steps.changed-files.outputs.all_changed_files}} | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ${{ matrix.docker-file }} | ||
push: False | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters