Skip to content

Commit

Permalink
adjusted paths (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung authored Dec 27, 2024
1 parent 92871f9 commit bfecd9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test-PR-dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: Ana06/[email protected]
with:
format: 'json'
filter: 'Dockerfile'
filter: 'build-files/*/*/Dockerfile'
- run: "echo ${{ steps.files.outputs.all }}"

build_to_test:
Expand All @@ -34,11 +34,13 @@ jobs:
- name: parse file path
id: parse
run: |
tool=$(echo "${{ matrix.added_modified }}" | cut -f 1 -d "/" )
version=$(echo "${{ matrix.added_modified }}" | cut -f 2 -d "/" )
echo "parsing ${{ matrix.added_modified }}"
tool=$(echo "${{ matrix.added_modified }}" | cut -f 2 -d "/" )
version=$(echo "${{ matrix.added_modified }}" | cut -f 3 -d "/" )
echo "found version $version for $tool"
echo "tool=$tool" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
##### --------------------------------------------------------------------------- #####
##### Workflows still cannot be run in parrallel as of 2022-12-01 #####
##### --------------------------------------------------------------------------- #####
Expand All @@ -60,9 +62,8 @@ jobs:
run: |
#checking layers
warning=''
app_layer=$(grep FROM ./${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}/Dockerfile | grep -E "as app|AS app")
tst_layer=$(grep FROM ./${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}/Dockerfile | grep -E "as test|AS test")
if [ -z "$app_layer" ] ; then echo "FATAL : app layer is missing" ; warning='warning' ; fi
app_layer=$(grep FROM ./build-files/${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}/Dockerfile | grep -E "as app|AS app")
tst_layer=$(grep FROM ./build-files/${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}/Dockerfile | grep -E "as test|AS test") if [ -z "$app_layer" ] ; then echo "FATAL : app layer is missing" ; warning='warning' ; fi
if [ -z "$tst_layer" ] ; then echo "FATAL : test layer is missing" ; warning='warning' ; fi
if [ -n "$warning" ] ; then echo "Please see template for recommended format https://github.com/StaPH-B/docker-builds/blob/master/dockerfile-template/Dockerfile" ; exit 1 ; fi
Expand All @@ -85,9 +86,8 @@ jobs:
id: docker_build_to_test
uses: docker/build-push-action@v5
with:
context: ./${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}
file: ./${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}/Dockerfile
target: test
context: ./build-files/${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}
file: ./build-files/${{ steps.parse.outputs.tool }}/${{ steps.parse.outputs.version }}/Dockerfile target: test
tags: ${{ steps.parse.outputs.tool }}:${{ steps.parse.outputs.version }}
load: true
push: false
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/update_freyja.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

##### ------------------------------------------------------------------------------------------------ #####
##### This caller workflow tests, builds, and pushes the image to Docker Hub and Quay using the most #####
##### recent version of Freyja and downloading the most recent variant information. #####
Expand Down Expand Up @@ -27,7 +28,7 @@ jobs:
version=1.5.2
echo "version=$version" >> $GITHUB_OUTPUT
file=freyja/$version/Dockerfile
file=build-files/freyja/$version/Dockerfile
ls $file
echo "file=$file" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -87,4 +88,4 @@ jobs:
quay.io/staphb/freyja:latest
- name: Image digest
run: echo ${{ steps.docker_build_user_defined_tag.outputs.digest }}
run: echo ${{ steps.docker_build_and_push.outputs.digest }}

0 comments on commit bfecd9e

Please sign in to comment.