Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
5944dbed
"tests/data/vscode:/vscode.git/clone" did not exist on "2e334f721ea8350f15badb36dc6cd7252bbc90a8"
Commit
5944dbed
authored
Mar 09, 2025
by
Harrison Saturley-Hall
Committed by
GitHub
Mar 09, 2025
Browse files
ci: remove caching of docker layers on PR builds (#61)
parent
678cffb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
20 deletions
+9
-20
.github/workflows/pre-merge-python.yml
.github/workflows/pre-merge-python.yml
+9
-20
No files found.
.github/workflows/pre-merge-python.yml
View file @
5944dbed
...
@@ -48,33 +48,22 @@ jobs:
...
@@ -48,33 +48,22 @@ jobs:
registry
:
ghcr.io
registry
:
ghcr.io
username
:
${{ github.actor }}
username
:
${{ github.actor }}
password
:
${{ secrets.GITHUB_TOKEN }}
password
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Set IMAGE_TAG based on Event
id
:
set_image_tag
run
:
|
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "IMAGE_TAG=ghcr.io/${{ github.repository }}:pr_${{ github.event.pull_request.number }}_${{ matrix.framework }}" >> $GITHUB_ENV
fi
-
name
:
Decide on cache
-
name
:
Decide on cache
id
:
which_cache
id
:
which_caches
env
:
CACHE_LOCATION
:
ghcr.io/${{ github.repository }}:latest-${{ matrix.framework }}
run
:
|
run
:
|
set +e
set +e
if [ "${{ github.event_name }}" == "pull_request" ]; then
if [ "${{ github.event_name }}" == "pull_request" ]; then
docker manifest inspect ${{ env.IMAGE_TAG }}
if [ $? -eq 0 ]; then
echo "Not pushing to container image cache"
echo "USING ${{ env.IMAGE_TAG }}"
echo "cache_to_location=" >> $GITHUB_OUTPUT
echo "CACHE_LOCATION=${{ env.IMAGE_TAG }}" >> $GITHUB_ENV
else
fi
echo "Pushing ${{ env.IMAGE_TAG }} to container image cache"
echo "cache_to_location=--cache-to \"type=registry,ref=${{ env.IMAGE_TAG }},image-manifest=true,mode=max\"" >> $GITHUB_OUTPUT
fi
fi
echo "cache_from_location=${{ env.CACHE_LOCATION }}" >> $GITHUB_OUTPUT
echo "cache_from_location=--cache-from \"type=registry,ref=${{ env.IMAGE_TAG }}\"" >> $GITHUB_OUTPUT
echo "cache_to_location=${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
-
name
:
Build image
-
name
:
Build image
env
:
CACHE_FROM
:
"
type=registry,ref=${{
steps.which_cache.outputs.cache_from_location
}}"
CACHE_TO
:
"
type=registry,ref=${{
steps.which_cache.outputs.cache_to_location
}},image-manifest=true,mode=max"
run
:
|
run
:
|
./container/build.sh --tag ${{ env.IMAGE_TAG }} --framework ${{ matrix.framework }}
--
cache
-
from
"${{ env.CACHE_FROM }}" --cache-to "${{ env.CACHE_TO
}}
"
./container/build.sh --tag ${{ env.IMAGE_TAG }} --framework ${{ matrix.framework }}
${{ steps.which_caches.outputs.
cache
_
from
_location }} ${{ steps.which_caches.outputs.cache_to_location
}}
-
name
:
Run pytest
-
name
:
Run pytest
env
:
env
:
PYTEST_MARKS
:
"
pre_merge
or
mypy"
PYTEST_MARKS
:
"
pre_merge
or
mypy"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment