Skip to content

Commit 90d4ff5

Browse files
committed
optional steps
1 parent bdc6c11 commit 90d4ff5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/collector-builder.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
uses: docker/setup-buildx-action@v3
7777

7878
- name: Set up builder ccache
79+
if: env.USE_CCACHE
7980
uses: actions/cache@v4
8081
with:
8182
path: ${{ github.workspace }}/builder/.ccache
@@ -84,7 +85,7 @@ jobs:
8485
builder-ccache-${{ matrix.arch }}-
8586
8687
- name: Set up builder ccache in docker cache
87-
if: matrix.arch != 's390x'
88+
if: env.USE_CCACHE && matrix.arch != 's390x'
8889
uses: reproducible-containers/buildkit-cache-dance@v3.1.2
8990
with:
9091
cache-map: |
@@ -146,7 +147,7 @@ jobs:
146147
echo "rhacs_eng_password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}"
147148
echo "collector_git_ref: ${{ github.ref }}"
148149
echo "collector_builder_tag: ${{ env.COLLECTOR_BUILDER_TAG }}"
149-
echo "use_ccache: ${USE_CCACHE}"
150+
echo "use_ccache: ${{ env.USE_CCACHE }}"
150151
} > ${{ github.workspace }}/ansible/secrets.yml
151152
152153
- name: Build images

.github/workflows/collector.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
submodules: true
4848

4949
- name: Set up ccache
50+
if: env.USE_CCACHE
5051
uses: hendrikmuhs/ccache-action@v1.2
5152
with:
5253
key: ${{ matrix.arch }}
@@ -73,7 +74,7 @@ jobs:
7374
collector_tag: ${{ inputs.collector-tag }}
7475
debug_mode: ${{ github.event_name == 'pull_request' }}
7576
driver_version: ${DRIVER_VERSION}
76-
use_ccache: ${USE_CCACHE}
77+
use_ccache: ${( env.USE_CCACHE }}
7778
EOF
7879
7980
- name: Build images
@@ -131,6 +132,7 @@ jobs:
131132
job-tag: builder
132133

133134
- name: Set up ccache
135+
if: env.USE_CCACHE
134136
uses: actions/cache@v4
135137
with:
136138
path: ${{ github.workspace }}/.ccache
@@ -158,7 +160,7 @@ jobs:
158160
collector_image: ${{ inputs.collector-image }}
159161
collector_tag: ${{ inputs.collector-tag }}
160162
debug_mode: ${{ github.event_name == 'pull_request' }}
161-
use_ccache: ${USE_CCACHE}
163+
use_ccache: ${( env.USE_CCACHE }}
162164
EOF
163165
164166
- name: Build ${{ matrix.arch }} image

builder/install/install-dependencies.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ mkdir -p "${LICENSE_DIR}"
99
NPROCS="$(nproc)"
1010
export NPROCS
1111

12+
# shellcheck source=SCRIPTDIR/versions.sh
13+
source builder/install/versions.sh
14+
1215
if [ "${USE_CCACHE}" = "true" ]; then
1316
# build and install ccache
1417
./builder/install/ccache.sh
@@ -26,8 +29,6 @@ if [ "${USE_CCACHE}" = "true" ]; then
2629
ccache -z -d /root/.ccache
2730
fi
2831

29-
# shellcheck source=SCRIPTDIR/versions.sh
30-
source builder/install/versions.sh
3132
for f in builder/install/[0-9][0-9]-*.sh; do
3233
echo "=== $f ==="
3334
./"$f"

0 commit comments

Comments
 (0)