Skip to content

Commit

Permalink
Fix Ubuntu CI by extracting latest Tag instead of organization variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Oct 8, 2024
1 parent 7d5781c commit 4acc812
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,36 @@ jobs:
fail-fast: false
matrix:
distro: [focal, jammy, noble]
container:
image: ghcr.io/tesseract-robotics/tesseract:${{ matrix.distro }}-${{ vars.TESSERACT_DOCKER_TAG }}
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/${{ matrix.distro }}/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src

- name: Get latest tag
id: get_latest_tag # This step ID allows us to reference its outputs
run: |
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Latest tag: $latest_tag"
# Extract major and minor version from the tag
IFS='.' read -r major minor patch <<< "$latest_tag"
echo "Major: $major"
echo "Minor: $minor"
# Set as output variables
echo "::set-output name=major::$major"
echo "::set-output name=minor::$minor"
container:
image: ghcr.io/tesseract-robotics/tesseract:${{ matrix.distro }}-${{ steps.get_latest_tag.outputs.major }}.${{ steps.get_latest_tag.outputs.minor }}
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/${{ matrix.distro }}/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC

steps:
- name: Build and Tests
uses: tesseract-robotics/colcon-action@v8
with:
Expand Down

0 comments on commit 4acc812

Please sign in to comment.