diff --git a/.github/workflows/test-PR-dockerfiles.yml b/.github/workflows/test-PR-dockerfiles.yml index 48173df99..7bb51fd06 100644 --- a/.github/workflows/test-PR-dockerfiles.yml +++ b/.github/workflows/test-PR-dockerfiles.yml @@ -20,7 +20,7 @@ jobs: uses: Ana06/get-changed-files@v2.3.0 with: format: 'json' - filter: 'Dockerfile' + filter: 'build-files/*/*/Dockerfile' - run: "echo ${{ steps.files.outputs.all }}" build_to_test: @@ -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 ##### ##### --------------------------------------------------------------------------- ##### @@ -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 @@ -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 diff --git a/.github/workflows/update_freyja.yml b/.github/workflows/update_freyja.yml index 7a4e36cce..a0e546937 100644 --- a/.github/workflows/update_freyja.yml +++ b/.github/workflows/update_freyja.yml @@ -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. ##### @@ -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 @@ -87,4 +88,4 @@ jobs: quay.io/staphb/freyja:latest - name: Image digest - run: echo ${{ steps.docker_build_user_defined_tag.outputs.digest }} \ No newline at end of file + run: echo ${{ steps.docker_build_and_push.outputs.digest }}