Skip to content

Commit 0a21ea5

Browse files
committed
Merge branch 'develop' into update-from-template-github_com_xdev-software_standard-maven-template_master-merged
2 parents 2427362 + 73b89f6 commit 0a21ea5

342 files changed

Lines changed: 45264 additions & 138 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/tci/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/tci/issues) or [closed](https://github.com/xdev-software/tci/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/tci/issues) or [closed](https://github.com/xdev-software/tci/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/tci/issues) or [closed](https://github.com/xdev-software/tci/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Composite GitHub Actions
2+
3+
Example usage can be found in [`run-integration-tests.yml`](../../workflows/run-integration-tests.yml)
4+
5+
## Notes
6+
* [Parallel execution](https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/) is not yet available for composite actions
7+
* Therefore `restore` and `setup-buildx` are currently split as it's recommended that they be implemented in parallel downstream
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Restores previously downloaded images from cache so that they don't need to be pulled again
2+
3+
Additionally it also saves what images have already been pre-installed so that these might later not be [saved](../save/) into the cache.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: 'Restore docker image cache'
2+
description: 'Restore and load docker image cache'
3+
# Based on https://github.com/actions/cache/blob/v6/restore/action.yml
4+
inputs:
5+
key:
6+
description: 'An explicit key for restoring the cache'
7+
required: true
8+
restore-keys:
9+
description: 'An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.'
10+
required: false
11+
save-preinstalled-images:
12+
description: 'Should pre-installed images be saved (not recommended)'
13+
required: false
14+
outputs:
15+
key:
16+
description: 'Identical to the input - can be used to prevent copy pasting'
17+
value: ${{ inputs.key }}
18+
cache-hit:
19+
description: 'A boolean value to indicate an exact match was found for the primary key'
20+
value: ${{ steps.restore-docker-image-cache.outputs.cache-hit }}
21+
runs:
22+
using: "composite"
23+
steps:
24+
# NOTE 2026-07-09 Parallel execution is not yet available for composite actions
25+
# https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/
26+
- name: Restore docker image cache
27+
uses: actions/cache/restore@v6
28+
id: restore-docker-image-cache
29+
with:
30+
path: ~/.cache/docker/
31+
key: ${{ inputs.key }}
32+
restore-keys: ${{ inputs.restore-keys }}
33+
34+
- name: Load docker image cache
35+
shell: bash
36+
run: |
37+
if [ "${{ inputs.save-preinstalled-images }}" != true ]; then
38+
echo "Getting preinstalled images" && docker image ls
39+
preinstalled_image_ids=$(docker images -q | sort)
40+
41+
echo "Storing preinstalled image ids" && echo $preinstalled_image_ids
42+
mkdir -p ~/.cache/docker-preinstalled
43+
printf "%s\n" "${preinstalled_image_ids[@]}" > ~/.cache/docker-preinstalled/ids-${{ github.run_id }}.txt
44+
fi
45+
46+
if [ -f ~/.cache/docker/images.tar ]; then
47+
echo "Importing cache"
48+
docker load -i ~/.cache/docker/images.tar && echo "Restored docker image cache" && docker image ls || true
49+
50+
echo "Deleting cache file to free up disk space"
51+
rm -f ~/.cache/docker/images.tar || true
52+
else
53+
echo "No file cache file found"
54+
fi
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Saves the pulled images into the cache
2+
3+
An image will be ignored if:
4+
* it was preinstalled (this information is acquired from [restore](../restore/))
5+
* it is labeled with
6+
* `org.testcontainers.sessionId` (Testcontainers `deleteOnExit` label)
7+
* `tci.image-cache.ignore`
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 'Save docker image cache'
2+
description: 'Save the docker image cache'
3+
# Based on https://github.com/actions/cache/blob/v6/restore/action.yml
4+
inputs:
5+
key:
6+
description: 'An explicit key for restoring the cache'
7+
required: true
8+
cache-hit:
9+
description: 'A boolean value to indicate an exact match was found for the primary key'
10+
required: false
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Create docker image cache
15+
# Cache can't be saved when it's already present
16+
if: inputs.cache-hit != 'true'
17+
shell: bash
18+
run: |
19+
echo "Images before pruning" && docker image ls
20+
docker image prune -f
21+
echo "Currently available images" && docker image ls
22+
23+
has_preinstalled_ids=false
24+
if [ -f ~/.cache/docker-preinstalled/ids-${{ github.run_id }}.txt ]; then
25+
echo && echo "Will NOT cache pre-installed images" && cat ~/.cache/docker-preinstalled/ids-${{ github.run_id }}.txt
26+
has_preinstalled_ids=true
27+
fi
28+
29+
echo && echo "Will NOT cache the following images"
30+
docker image ls -f="label=org.testcontainers.sessionId"
31+
docker image ls -f="label=tci.image-cache.ignore"
32+
33+
mkdir -p ~/.cache/docker
34+
image_ids_to_save=$(comm -23 <(docker images -q | sort) <((docker image ls -q -f="label=org.testcontainers.sessionId"; docker image ls -q -f="label=tci.image-cache.ignore") | sort | uniq))
35+
if [ "$has_preinstalled_ids" = true ]; then
36+
image_ids_to_save=$(comm -23 <(echo "${image_ids_to_save[@]}") <(cat ~/.cache/docker-preinstalled/ids-${{ github.run_id }}.txt || echo ""))
37+
fi
38+
echo && echo "Saving image ids" && echo $image_ids_to_save
39+
docker save $image_ids_to_save -o ~/.cache/docker/images.tar || true
40+
41+
ls -lha ~/.cache/docker
42+
if [ "$has_preinstalled_ids" = true ]; then
43+
rm -f ~/.cache/docker-preinstalled/ids-${{ github.run_id }}.txt || true
44+
fi
45+
46+
- name: Save docker image cache
47+
if: inputs.cache-hit != 'true'
48+
uses: actions/cache/save@v6
49+
with:
50+
path: ~/.cache/docker/
51+
key: ${{ inputs.key }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Set's up the buildx worker and returns [required environment variables](https://docs.docker.com/build/cache/backends/gha/#authentication) for the buildx build.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Setup buildx'
2+
description: 'Setup buildx'
3+
outputs:
4+
ACTIONS_RUNTIME_TOKEN:
5+
value: ${{ steps.actions-vars.outputs.ACTIONS_RUNTIME_TOKEN }}
6+
ACTIONS_RESULTS_URL:
7+
value: ${{ steps.actions-vars.outputs.ACTIONS_RESULTS_URL }}
8+
runs:
9+
using: "composite"
10+
steps:
11+
# These are required for caching
12+
# https://docs.docker.com/build/cache/backends/gha/#authentication
13+
- name: Get Actions Runtime credentials
14+
if: runner.os != 'Windows'
15+
id: actions-vars
16+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
17+
with:
18+
script: |
19+
core.setOutput('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
20+
core.setOutput('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'])
21+
22+
- uses: docker/setup-buildx-action@v4
23+
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)