Skip to content

Commit

Permalink
ci(ct): use image revision action in maintenance workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Sep 3, 2024
1 parent 9486117 commit 5fd9017
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/container_maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ jobs:
- name: Calculate revision number for immutable tag (on release branches only)
if: ${{ matrix.branch != env.DEVELOP_BRANCH }}
run: |
# Get the revision logic script (not present on older releases)
curl -sSL "https://github.com/${GITHUB_REPOSITORY}/archive/${DEVELOP_BRANCH}.tar.gz" | \
tar -zxf - -C "." --wildcards "*/.github/workflows/scripts/get_next_revision.sh" --strip-components=1
# Now get the new revision number
REVISION_TAG="${BASE_IMAGE#*:}-r$( .github/workflows/scripts/get_next_revision.sh "${BASE_IMAGE}" )"
echo "DOCKER_TAGS=-Dbase.image.tag=\${base.image.tag.release} -Ddocker.imagePropertyConfiguration=override -Ddocker.tags.revision=${REVISION_TAG}" | tee -a "${GITHUB_ENV}"
id: revision-tag
# TODO: change to upstream location in final PR
uses: gdcc/wip-dataverse-base-image/.github/actions/get-image-revision@10478-version-base-img
with:
image-ref: ${{ env.BASE_IMAGE }}
tag-options-prefix: "-Dbase.image.tag=\${base.image.tag.release} -Ddocker.imagePropertyConfiguration=override -Ddocker.tags.revision="
- name: Configure update of "latest" tag for development branch
if: ${{ matrix.branch == env.DEVELOP_BRANCH }}
run: |
Expand All @@ -139,7 +138,7 @@ jobs:
if: ${{ steps.temurin-check.outputs.is-more-recent == 'true' || steps.package-check.outputs.newer_packages == 'true' || inputs.force_build }}
id: build
run: |
mvn -f modules/container-base -Pct deploy -Ddocker.noCache ${DOCKER_TAGS} -Ddocker.platforms=${{ env.PLATFORMS }}
mvn -f modules/container-base -Pct deploy -Ddocker.noCache ${DOCKER_TAGS} ${{ steps.revision-tag.outputs.tag-options }} -Ddocker.platforms=${{ env.PLATFORMS }}
echo "rebuild=true" | tee -a "${GITHUB_OUTPUT}"
# - if: always()
Expand Down

0 comments on commit 5fd9017

Please sign in to comment.