Skip to content

Commit

Permalink
tag is now optional
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVCaron committed Sep 20, 2024
1 parent 9cf8d19 commit 60e8504
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/actions-runner-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,12 @@ jobs:
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
- name: VTK version
id: vtk-version
run: |
version=$(echo -n $(cat /VERSION | grep 'vtk =>' | cut -d '>' -f2 | tr -d '\n' | tr -d ' '))
echo "version=$version" >> $GITHUB_OUTPUT
build-runner-image:
needs: [compute-dependencies-versions]
if: ${{ (needs.compute-dependencies-versions.outputs.runner_current_version != needs.compute-dependencies-versions.outputs.runner_latest_version) }}
uses: ./.github/workflows/docker-builder.yml
with:
target: actions-runner
tag: ${{ needs.compute-dependencies-versions.outputs.runner_latest_version }}-vtk${{ needs.compute-dependencies-versions.outputs.vtk_version }}
update-latest: true
disable-builddate-tag: true
actions-runner-version: ${{ needs.compute-dependencies-versions.outputs.runner_latest_version }}
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/docker-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ on:
required: true
type: string
tag:
required: true
required: false
type: string
update-latest:
required: false
Expand Down Expand Up @@ -179,6 +179,11 @@ jobs:
[ "${{ inputs.target }}" == "scilus-flows" ] && \
version "${{ inputs.scilus-for-scilus-flows-tag }}" SCILUS_TAG
vtk_version = "$(cat versioning.hcl | grep 'vtk-version' | cut -d '=' -f2)"
vtk_version = "$(echo $vtk_version | tr -d ' ' | tr -d '\"')"
ACR_TAG=${{ inputs.tag }}-vtk${vtk_version}
[ -z "${{ inputs.actions-runner-version }}" ] || version $ACR_TAG ACR_TAG
echo "bake-file=$PWD/local-versioning.hcl" >> $GITHUB_OUTPUT
-
name: Set output image tags and registry to publish to
Expand All @@ -188,20 +193,16 @@ jobs:
run: |
touch tag-publishing
echo "${{ inputs.target }}.output=type=registry" >> tag-publishing
echo "${{ inputs.target }}.tags=${{ env.IMAGE }}:${{ inputs.tag }}" >> tag-publishing
[ -z ${{ inputs.tag }} ] ||
echo "${{ inputs.target }}.tags=${{ env.IMAGE }}:${{ inputs.tag }}" >> tag-publishing
[ "${{ inputs.disable-builddate-tag }}" != "true" ] && \
echo "${{ inputs.target }}.tags=${{ env.IMAGE }}-$(date +'%Y%m%d')" >> tag-publishing
[ "${{ inputs.update-latest }}" == "true" ] && \
echo "${{ inputs.target }}.tags=${{ env.IMAGE }}:latest" >> tag-publishing
vtk_version = "$(cat versioning.hcl | grep 'vtk-version' | cut -d '=' -f2)"
vtk_version = "$(echo $vtk_version | tr -d ' ' | tr -d '\"')"
ACR_TAG=${{ inputs.tag }}-vtk${vtk_version}
[ -z "${{ inputs.actions-runner-version }}" ] || \
echo "ACR_TAG=\"$ACR_TAG\"" >> tag-publishing
DELIM="$(echo $RANDOM | base64 | head -c 3; echo)"
echo "tags-file=$PWD/tag-publishing" >> $GITHUB_OUTPUT
echo "tags-string<<$DELIM" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 60e8504

Please sign in to comment.