Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjusted paths #1154

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
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
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 }}